summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ui/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index 71146682..11f41f6a 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -264,7 +264,7 @@ void closeMenu_Widget(iWidget *d) {
264} 264}
265 265
266int checkContextMenu_Widget(iWidget *menu, const SDL_Event *ev) { 266int checkContextMenu_Widget(iWidget *menu, const SDL_Event *ev) {
267 if (ev->type == SDL_MOUSEBUTTONDOWN && ev->button.button == SDL_BUTTON_RIGHT) { 267 if (menu && ev->type == SDL_MOUSEBUTTONDOWN && ev->button.button == SDL_BUTTON_RIGHT) {
268 if (isVisible_Widget(menu)) { 268 if (isVisible_Widget(menu)) {
269 closeMenu_Widget(menu); 269 closeMenu_Widget(menu);
270 return 0x1; 270 return 0x1;