diff --git a/src/raygui.h b/src/raygui.h index d23d2d4..56ab0e8 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -1444,7 +1444,7 @@ void GuiPanel(Rectangle bounds, const char *text) // Text will be drawn as a header bar (if provided) Rectangle statusBar = { bounds.x, bounds.y, bounds.width, (float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT }; - if (bounds.height < RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT*2.0f) bounds.height = RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT*2.0f; + if ((text != NULL) && (bounds.height < RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT*2.0f)) bounds.height = RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT*2.0f; if (text != NULL) {