From bb65020a6e8e7bb302e027254e1d6c2cde5d56da Mon Sep 17 00:00:00 2001 From: lempamo Date: Fri, 24 Feb 2017 14:47:37 -0500 Subject: [PATCH] Fixed NRE --- ShiftOS.WinForms/WinformsDesktop.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShiftOS.WinForms/WinformsDesktop.cs b/ShiftOS.WinForms/WinformsDesktop.cs index 8ca7969..2bb2715 100644 --- a/ShiftOS.WinForms/WinformsDesktop.cs +++ b/ShiftOS.WinForms/WinformsDesktop.cs @@ -251,9 +251,9 @@ namespace ShiftOS.WinForms })); this.BackgroundImageLayout = GetImageLayout("desktopbackground"); desktoppanel.BackgroundImage = ((Bitmap)GetImage("desktoppanel")); - ((Bitmap)desktoppanel.BackgroundImage).MakeTransparent(Color.FromArgb(1, 0, 1)); + if (desktoppanel.BackgroundImage != null) ((Bitmap)desktoppanel.BackgroundImage).MakeTransparent(Color.FromArgb(1, 0, 1)); menuStrip1.BackgroundImage = GetImage("applauncher"); - ((Bitmap)menuStrip1.BackgroundImage).MakeTransparent(Color.FromArgb(1, 0, 1)); + if (menuStrip1.BackgroundImage != null) ((Bitmap)menuStrip1.BackgroundImage).MakeTransparent(Color.FromArgb(1, 0, 1)); lbtime.ForeColor = LoadedSkin.DesktopPanelClockColor; lbtime.Font = LoadedSkin.DesktopPanelClockFont; if (desktoppanel.BackgroundImage == null)