Browse Source

Fixed a Crash with GuiRadioCtrl

Peter Robinson 4 years ago
parent
commit
fe1b03a030
1 changed files with 1 additions and 1 deletions
  1. 1 1
      engine/source/gui/buttons/guiRadioCtrl.cc

+ 1 - 1
engine/source/gui/buttons/guiRadioCtrl.cc

@@ -45,7 +45,7 @@ void GuiRadioCtrl::renderInnerControl(RectI &boxRect, const GuiControlState curr
 {
 {
 	U8 stateIndex = currentState;
 	U8 stateIndex = currentState;
 
 
-	if ((mProfile->mImageAsset->isAssetValid() && mProfile->mImageAsset->getFrameCount() > stateIndex) 
+	if ((mProfile->mImageAsset != NULL && mProfile->mImageAsset->isAssetValid() && mProfile->mImageAsset->getFrameCount() > stateIndex) 
 		|| (mProfile->mBitmapName != NULL && mProfile->constructBitmapArray() > stateIndex))
 		|| (mProfile->mBitmapName != NULL && mProfile->constructBitmapArray() > stateIndex))
 	{
 	{
 		renderUniversalRect(boxRect, mProfile, currentState);
 		renderUniversalRect(boxRect, mProfile, currentState);