From 4a7eb9cb0c9653d85af7beae820db398c89bd233 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 27 Sep 2011 17:00:35 +0000 Subject: STR 2683: calling show_cursor() before a text buffer is assigned to an Fl_Text_Diisplay deos not crash any longer. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9064 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Text_Display.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index e6151d4a3..829883883 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -606,6 +606,7 @@ void Fl_Text_Display::insert_position( int newPos ) { */ void Fl_Text_Display::show_cursor(int b) { mCursorOn = b; + if (!buffer()) return; redisplay_range(buffer()->prev_char_clipped(mCursorPos), buffer()->next_char(mCursorPos)); } -- cgit v1.2.3