diff --git a/DisplayMagician/UIForms/ProfileAdaptor.cs b/DisplayMagician/UIForms/ProfileAdaptor.cs index fde8022..e3909dc 100644 --- a/DisplayMagician/UIForms/ProfileAdaptor.cs +++ b/DisplayMagician/UIForms/ProfileAdaptor.cs @@ -1,4 +1,7 @@ using DisplayMagicianShared; +using DisplayMagicianShared.NVIDIA; +using DisplayMagicianShared.AMD; +using DisplayMagicianShared.Windows; using Manina.Windows.Forms; using System; using System.Collections.Generic; @@ -62,8 +65,12 @@ namespace DisplayMagician.UIForms profileToUse = ProfileRepository.CurrentProfile; } + // Stop the callback doing anything Image.GetThumbnailImageAbort myCallback = new Image.GetThumbnailImageAbort(() => { return false; }); - return profileToUse.ProfileBitmap.GetThumbnailImage(size.Width, size.Height, myCallback, IntPtr.Zero); + + Image imageToUse; + imageToUse = profileToUse.ProfileBitmap.GetThumbnailImage(size.Width, size.Height, myCallback, IntPtr.Zero); + return imageToUse; } catch (Exception ex) { diff --git a/DisplayMagicianShared/ProfileItem.cs b/DisplayMagicianShared/ProfileItem.cs index f2cdc20..b96fd0e 100644 --- a/DisplayMagicianShared/ProfileItem.cs +++ b/DisplayMagicianShared/ProfileItem.cs @@ -564,6 +564,12 @@ namespace DisplayMagicianShared } public static bool operator !=(ProfileItem lhs, ProfileItem rhs) => !(lhs == rhs); + + // IMPORTANT - This ProfileItem ToString function is required to make the Profile ImageListView work properly! DO NOT DELETE! + public override string ToString() + { + return (Name ?? Language.UN_TITLED_PROFILE); + } } }