From fd8bbe69bdde61aee1b887951ae9a5623b499ff3 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Tue, 1 Oct 2019 17:57:42 -0600 Subject: [PATCH] fix npe --- CHANGELOG.md | 1 + Wabbajack/AppState.cs | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3ba917c..aeeb45ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Modlists are now .zip files. * Modlists now end with `.modlist_v1` to enable better version control * If `readme.md` is found in the profile directory, inline it into the install report. +* Fix bug with null uri in slideshow images #### Version 0.9.3 - 9/30/2019 * Add WABBAJACK_NOMATCH_INCLUDE works like WABBAJACK_INCLUDE but only includes files that are found to be missing at the end of compilation diff --git a/Wabbajack/AppState.cs b/Wabbajack/AppState.cs index 527a5e9e..177b85a5 100644 --- a/Wabbajack/AppState.cs +++ b/Wabbajack/AppState.cs @@ -364,12 +364,15 @@ namespace Wabbajack dispatcher.Invoke(() => { var element = SlideShowElements[_random.Next(0, SlideShowElements.Count)]; - SplashScreenImage = new BitmapImage(new Uri(element.ImageURL)); - SplashScreenModName = element.ModName; - SplashScreenAuthorName = element.AuthorName; - SplashScreenSummary = element.ModSummary; - _nexusSiteURL = element.ModURL; + if (element.ImageURL != null) + { + SplashScreenImage = new BitmapImage(new Uri(element.ImageURL)); + SplashScreenModName = element.ModName; + SplashScreenAuthorName = element.AuthorName; + SplashScreenSummary = element.ModSummary; + _nexusSiteURL = element.ModURL; + } _lastSlideShowUpdate = DateTime.Now; }); }