Explorar o código

Merge pull request #643 from Ragora/bugfix-material-selector-invocation

BugFix: Don't assume a tooltip profile is going to be set when waking and sleeping
Brian Roberts %!s(int64=3) %!d(string=hai) anos
pai
achega
99daf9479e
Modificáronse 1 ficheiros con 10 adicións e 2 borrados
  1. 10 2
      Engine/source/gui/core/guiControl.cpp

+ 10 - 2
Engine/source/gui/core/guiControl.cpp

@@ -843,7 +843,11 @@ bool GuiControl::onWake()
 
    //increment the profile
    mProfile->incLoadCount();
-   mTooltipProfile->incLoadCount();
+
+   if (mTooltipProfile)
+   {
+       mTooltipProfile->incLoadCount();
+   }
 
    // Only invoke script callbacks if we have a namespace in which to do so
    // This will suppress warnings
@@ -869,7 +873,11 @@ void GuiControl::onSleep()
 
    //decrement the profile reference
    mProfile->decLoadCount();
-   mTooltipProfile->decLoadCount();
+
+   if (mTooltipProfile)
+   {
+       mTooltipProfile->decLoadCount();
+   }
 
    // Set Flag
    mAwake = false;