[chronojump] At start, updating splashWin labels checks if splashWin is null



commit e7705ec2376759ebaec31e6163fd16b4a6a2e427
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Mar 21 10:28:01 2018 +0100

    At start, updating splashWin labels checks if splashWin is null

 src/gui/chronojump.cs |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index d84a421..c6873ea 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -566,7 +566,8 @@ public partial class ChronoJumpWindow
 
                // ------ Loading preferences ------
 
-               splashWin.UpdateLabel(Catalog.GetString(Constants.SplashMessages[7]));
+               if(splashWin != null)
+                       splashWin.UpdateLabel(Catalog.GetString(Constants.SplashMessages[7]));
                
                //preferencesLoaded is a fix to a gtk#-net-windows-bug where radiobuttons raise signals
                //at initialization of chronojump and gives problems if this signals are raised while 
preferences are loading
@@ -584,7 +585,8 @@ public partial class ChronoJumpWindow
                
                // ------ Creating widgets ------
 
-               splashWin.UpdateLabel(Catalog.GetString(Constants.SplashMessages[8]));
+               if(splashWin != null)
+                       splashWin.UpdateLabel(Catalog.GetString(Constants.SplashMessages[8]));
 
                createTreeView_persons (treeview_persons);
 
@@ -661,7 +663,8 @@ public partial class ChronoJumpWindow
 
                // ------ Creating encoder widgets ------
 
-               splashWin.UpdateLabel(Catalog.GetString(Constants.SplashMessages[9]));
+               if(splashWin != null)
+                       splashWin.UpdateLabel(Catalog.GetString(Constants.SplashMessages[9]));
 
                encoderInitializeStuff();       
 
@@ -680,7 +683,8 @@ public partial class ChronoJumpWindow
 
                // ------ Starting main window ------
 
-               splashWin.UpdateLabel(Catalog.GetString(Constants.SplashMessages[10]));
+               if(splashWin != null)
+                       splashWin.UpdateLabel(Catalog.GetString(Constants.SplashMessages[10]));
 
                /*
                 * start a ping in other thread


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]