summaryrefslogtreecommitdiff
path: root/meme/gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'meme/gui.c')
-rw-r--r--meme/gui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/meme/gui.c b/meme/gui.c
index 2ecdafe..7ee2281 100644
--- a/meme/gui.c
+++ b/meme/gui.c
@@ -67,7 +67,7 @@ static bool show_profiles = 0;
static bool show_overlay = 0;
static bool show_mesh = 1;
static const struct vertex *cursor;
-static const struct overlay *overlay;
+static const struct overlay *overlay = NULL;
/* ----- Coordinate transform ---------------------------------------------- */
@@ -940,7 +940,8 @@ static void lineto(void *user, int x, int y)
static void draw_overlay(SDL_Surface *s, const struct overlay *over)
{
- overlay_draw(over, moveto, lineto, s);
+ if (over)
+ overlay_draw(over, moveto, lineto, s);
}