From df49b0709b1916d81a8664fcdbce765276201131 Mon Sep 17 00:00:00 2001 From: QC Date: Fri, 6 Jun 2014 19:31:33 +0200 Subject: [PATCH] Fix segfault in hmode. --- source/textbox.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/textbox.c b/source/textbox.c index 96eecc19..7adb18f5 100644 --- a/source/textbox.c +++ b/source/textbox.c @@ -188,6 +188,9 @@ void textbox_hide ( textbox *tb ) // will also unmap the window if still displayed void textbox_free ( textbox *tb ) { + if ( tb == NULL ) { + return; + } if ( tb->flags & TB_EDITABLE ) { XDestroyIC ( tb->xic ); XCloseIM ( tb->xim );