From 54a1147986863fc8a8889af7e829f437300b35a4 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Wed, 23 Dec 2015 17:59:03 +0100 Subject: [PATCH] Small fix --- source/textbox.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/textbox.c b/source/textbox.c index ea129aa3..250935d5 100644 --- a/source/textbox.c +++ b/source/textbox.c @@ -414,6 +414,11 @@ static void textbox_cursor_dec_word ( textbox *tb ) // end of line void textbox_cursor_end ( textbox *tb ) { + if ( tb->text == NULL ) { + tb->cursor = 0; + tb->update = TRUE; + return; + } tb->cursor = ( int ) strlen ( tb->text ); tb->update = TRUE; }