diff --git a/src/raygui.h b/src/raygui.h index 85c4778..6d5074e 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -2149,7 +2149,9 @@ int GuiToggleSlider(Rectangle bounds, const char *text, int *active) // Get substrings items from text (items pointers) int itemCount = 0; - const char **items = GuiTextSplit(text, ';', &itemCount, NULL); + const char **items = NULL; + + if (text != NULL) items = GuiTextSplit(text, ';', &itemCount, NULL); Rectangle slider = { 0, // Calculated later depending on the active toggle