Skip to content

Commit

Permalink
fix app crashing when Skaping livecam is video
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBerger committed Aug 19, 2021
1 parent 17393c0 commit 9fd3814
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions LivecamWallpaper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "\"LivecamWallpaper/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -433,7 +433,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 0.2.0;
MARKETING_VERSION = 0.2.1;
PRODUCT_BUNDLE_IDENTIFIER = fr.pierreberger.LivecamWallpaper;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -451,7 +451,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "\"LivecamWallpaper/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -462,7 +462,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 0.2.0;
MARKETING_VERSION = 0.2.1;
PRODUCT_BUNDLE_IDENTIFIER = fr.pierreberger.LivecamWallpaper;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
5 changes: 5 additions & 0 deletions LivecamWallpaper/Controllers/SkapingController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ final class SkapingController {
return
}

if response.medias.count == 0 {
completion("No media for this livecam")
return
}

DispatchQueue.main.async {
let image = response.medias[response.medias.count - 1].src
let secureimage = image.replacingOccurrences(of: "http", with: "https")
Expand Down

0 comments on commit 9fd3814

Please sign in to comment.