summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2008-08-27 18:12:28 +0000
committerFabien Costantini <fabien@onepost.net>2008-08-27 18:12:28 +0000
commit5156431137c00d526b9ddafab694db9a05a9f7fe (patch)
tree42edf3747a3fbffbe2be882ff4e04170e71f00e3 /src
parentbc6d15183c530064b5a06b50527ae06d14003fb0 (diff)
STR #1972 fix :check validity of icrsr before updating cursor state.
Fixes crashes when setting up Fl_Wizard pane dynamically before show() is called. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6173 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/fl_cursor.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fl_cursor.cxx b/src/fl_cursor.cxx
index fb0d33b3e..6126ab3f3 100644
--- a/src/fl_cursor.cxx
+++ b/src/fl_cursor.cxx
@@ -230,9 +230,11 @@ void Fl_Window::cursor(Fl_Cursor c, Fl_Color, Fl_Color) {
case FL_CURSOR_DEFAULT:
default: break;
}
- SetCursor( *icrsr );
- if (i) {
- i->cursor = icrsr;
+ if (icrsr) { // make sure we have a non null icrsr before updating cursor state
+ SetCursor( *icrsr );
+ if (i) {
+ i->cursor = icrsr;
+ }
}
}