From 5c83b417a5c8299b1679cc7075c2782aba702b11 Mon Sep 17 00:00:00 2001 From: Robert MacGregor Date: Thu, 28 Oct 2021 10:40:13 -0400 Subject: [PATCH] * [GuiControl] BugFix: Don't assume a tooltip profile is going to be set when waking and sleeping. --- Engine/source/gui/core/guiControl.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Engine/source/gui/core/guiControl.cpp b/Engine/source/gui/core/guiControl.cpp index d312c7610..5f20c4302 100644 --- a/Engine/source/gui/core/guiControl.cpp +++ b/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;