From 764d759e10856e728cf66c3b44f39bf5034f2cb1 Mon Sep 17 00:00:00 2001 From: Terry MacDonald Date: Sat, 24 Jul 2021 16:26:10 +1200 Subject: [PATCH] Fixed exceprion with no game shortcut Fixes #25. When you attempted to create a shortcut that didnt run a game or executable, the program would save the shortcut, but would crash when trying to show it in the Shortcut library. This was because the _shortcutBitmap wsn't being populated when no game or executable was chosen. This has been fixed now, as it will use the profile bitmap as the shortcut bitmap in these instances. --- DisplayMagician/ShortcutItem.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/DisplayMagician/ShortcutItem.cs b/DisplayMagician/ShortcutItem.cs index 3a3cad8..4e6f7f4 100644 --- a/DisplayMagician/ShortcutItem.cs +++ b/DisplayMagician/ShortcutItem.cs @@ -732,13 +732,8 @@ namespace DisplayMagician // Now we need to find and populate the profileUuid _profileUuid = profile.UUID; - _originalBitmap = profile.ProfileBitmap; - - // We create the ShortcutBitmap from the OriginalBitmap - // (We only do it if there is a valid profile) - //if (_profileToUse is ProfileItem) - // _shortcutBitmap = ToBitmapOverlay(_originalBitmap, _profileToUse.ProfileTightestBitmap, 256, 256); + _shortcutBitmap = profile.ProfileBitmap; ReplaceShortcutIconInCache(); RefreshValidity();