From f38864db0da5b219ec5aa024125a33dc58e1b57d Mon Sep 17 00:00:00 2001 From: CONATH Date: Sat, 25 Dec 2021 22:37:51 +0100 Subject: [PATCH] Fix crash if poster images unavailable --- TMT Mac/ContentView.swift | 2 +- TMT Mac/Views/MovieTrailerListView.swift | 2 +- TheatricalMovieTrailers.xcodeproj/project.pbxproj | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TMT Mac/ContentView.swift b/TMT Mac/ContentView.swift index dc5e98d..6c0db9c 100644 --- a/TMT Mac/ContentView.swift +++ b/TMT Mac/ContentView.swift @@ -121,6 +121,6 @@ struct ContentView: View { } private func imageForMovie(_ movieInfo: MovieInfo) -> NSImage { - return (dataStore.idsAndImages[movieInfo.id] ?? NSImage(named: "MoviePosterPlaceholder"))! + return (dataStore.idsAndImages[movieInfo.id] ?? NSImage(named: "moviePosterPlaceholder"))! } } diff --git a/TMT Mac/Views/MovieTrailerListView.swift b/TMT Mac/Views/MovieTrailerListView.swift index e46d5ae..38a6e45 100644 --- a/TMT Mac/Views/MovieTrailerListView.swift +++ b/TMT Mac/Views/MovieTrailerListView.swift @@ -130,7 +130,7 @@ struct MovieTrailerListView: View { } private func imageForMovie(_ movieInfo: MovieInfo) -> NSImage { - return (dataStore.idsAndImages[movieInfo.id] ?? NSImage(named: "MoviePosterPlaceholder"))! + return (dataStore.idsAndImages[movieInfo.id] ?? NSImage(named: "moviePosterPlaceholder"))! } private func playTrailer(_ movieInfo: MovieInfo) { diff --git a/TheatricalMovieTrailers.xcodeproj/project.pbxproj b/TheatricalMovieTrailers.xcodeproj/project.pbxproj index 53cd8cc..0d9d09e 100644 --- a/TheatricalMovieTrailers.xcodeproj/project.pbxproj +++ b/TheatricalMovieTrailers.xcodeproj/project.pbxproj @@ -909,7 +909,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_ASSET_PATHS = "\"TMT Mac/Preview Content\""; DEVELOPMENT_TEAM = U96PJYMZWW; ENABLE_HARDENED_RUNTIME = YES; @@ -943,7 +943,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_ASSET_PATHS = "\"TMT Mac/Preview Content\""; DEVELOPMENT_TEAM = U96PJYMZWW; ENABLE_HARDENED_RUNTIME = YES;