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; }