use of get<some name> methods that already return nulls/false when attempting to load

in contexts where we would want to try first
This commit is contained in:
AzaezelX 2025-05-27 17:07:08 -05:00
parent a43458677a
commit 40974dd14b
11 changed files with 31 additions and 31 deletions

View file

@ -296,7 +296,7 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect )
RectI iconRect( 0, 0, 0, 0 );
// Render the icon
if ( mBitmapAsset.notNull() && mIconLocation != GuiIconButtonCtrl::IconLocNone)
if ( getBitmap() && mIconLocation != GuiIconButtonCtrl::IconLocNone)
{
// Render the normal bitmap
drawer->clearBitmapModulation();

View file

@ -88,7 +88,7 @@ void GuiToolboxButtonCtrl::inspectPostApply()
// set it's extent to be exactly the size of the normal bitmap (if present)
Parent::inspectPostApply();
if ((getWidth() == 0) && (getHeight() == 0) && mNormalBitmapAsset.notNull())
if ((getWidth() == 0) && (getHeight() == 0) && getNormalBitmap())
{
setExtent(getNormalBitmap()->getWidth(), getNormalBitmap()->getHeight());
}
@ -142,7 +142,7 @@ void GuiToolboxButtonCtrl::onRender(Point2I offset, const RectI& updateRect)
}
// Now render the image
if( mNormalBitmapAsset.notNull() )
if(getNormalBitmap())
{
renderButton(getNormalBitmap(), offset, updateRect );
return;