From 4c1da16d6fbbb53020192f283f4dd9d0f8b462ba Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Mon, 23 Oct 2023 13:02:22 -0400 Subject: [PATCH] Don't attempt to take the size of invalid bitmap --- common/widgets/bitmap_button.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/widgets/bitmap_button.cpp b/common/widgets/bitmap_button.cpp index 07436a54d4..dc3168b9c0 100644 --- a/common/widgets/bitmap_button.cpp +++ b/common/widgets/bitmap_button.cpp @@ -315,7 +315,7 @@ void BITMAP_BUTTON::OnPaint( wxPaintEvent& aEvent ) if( bmpImg.IsOk() ) bmpImg.SetScaleFactor( scale ); } - else + else if( bmp.IsOk() ) { bmpImg = bmp.GetBitmapFor( this ); bmSize = bmpImg.GetSize();