summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Display.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2011-09-27 17:00:35 +0000
committerMatthias Melcher <fltk@matthiasm.com>2011-09-27 17:00:35 +0000
commit4a7eb9cb0c9653d85af7beae820db398c89bd233 (patch)
tree5c8eb571ecc9c9f9c045c300c72a4c907b10dc9b /src/Fl_Text_Display.cxx
parente76a22d6c0f47e3d1c1ce30656657fc27571adfb (diff)
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
Diffstat (limited to 'src/Fl_Text_Display.cxx')
-rw-r--r--src/Fl_Text_Display.cxx1
1 files changed, 1 insertions, 0 deletions
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));
}