ecere/gui/Window: Prevent crash on null interface driver in UpdateCaption()
authorJerome St-Louis <jerome@ecere.com>
Wed, 2 Apr 2014 05:09:43 +0000 (01:09 -0400)
committerJerome St-Louis <jerome@ecere.com>
Wed, 2 Apr 2014 05:09:43 +0000 (01:09 -0400)
ecere/src/gui/Window.ec

index 6437169..e7e051d 100644 (file)
@@ -2440,7 +2440,8 @@ private:
       {
          char caption[2048];
          FigureCaption(caption);
-         guiApp.interfaceDriver.SetRootWindowCaption(this, caption);
+         if(guiApp.interfaceDriver)
+            guiApp.interfaceDriver.SetRootWindowCaption(this, caption);
       }
       UpdateDecorations();
       if(parent)
@@ -2451,7 +2452,8 @@ private:
             {
                char caption[2048];
                parent.FigureCaption(caption);
-               guiApp.interfaceDriver.SetRootWindowCaption(parent, caption);
+               if(guiApp.interfaceDriver)
+                  guiApp.interfaceDriver.SetRootWindowCaption(parent, caption);
             }
             else
                parent.UpdateCaption();