Skip to content

Commit

Permalink
STR #1972 fix :check validity of icrsr before updating cursor state.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fab672000 committed Aug 27, 2008
1 parent bc6d151 commit 5156431
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/fl_cursor.cxx
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 5156431

Please sign in to comment.