summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2003-11-01 01:07:07 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2003-11-01 01:07:07 +0000
commit037fd7bf94f856359012c70aa8b5783d2a8c5aab (patch)
tree41affd2d39d562127e72a2e3e86ddb7f3a4158c0 /src
parent84932815dfa612b881e7f8178ae5303f82a24354 (diff)
Fix cursor crash bug (STR #181)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3113 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Input_.cxx8
-rw-r--r--src/Fl_Text_Display.cxx6
-rw-r--r--src/Fl_Tile.cxx6
-rw-r--r--src/Fl_Wizard.cxx6
4 files changed, 13 insertions, 13 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx
index 6fd9716f3..c9e834be0 100644
--- a/src/Fl_Input_.cxx
+++ b/src/Fl_Input_.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.27 2003/01/30 21:42:00 easysw Exp $"
+// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.28 2003/11/01 01:07:07 easysw Exp $"
//
// Common input widget routines for the Fast Light Tool Kit (FLTK).
//
@@ -656,11 +656,11 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) {
switch (event) {
case FL_ENTER:
- if (active_r()) window()->cursor(FL_CURSOR_INSERT);
+ if (active_r() && window()) window()->cursor(FL_CURSOR_INSERT);
return 1;
case FL_LEAVE:
- if (active_r()) window()->cursor(FL_CURSOR_DEFAULT);
+ if (active_r() && window()) window()->cursor(FL_CURSOR_DEFAULT);
return 1;
case FL_FOCUS:
@@ -852,5 +852,5 @@ Fl_Input_::~Fl_Input_() {
}
//
-// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.27 2003/01/30 21:42:00 easysw Exp $".
+// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.28 2003/11/01 01:07:07 easysw Exp $".
//
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx
index 21a68a4aa..b37c8f5fc 100644
--- a/src/Fl_Text_Display.cxx
+++ b/src/Fl_Text_Display.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Display.cxx,v 1.12.2.46 2003/08/24 13:09:06 easysw Exp $"
+// "$Id: Fl_Text_Display.cxx,v 1.12.2.47 2003/11/01 01:07:07 easysw Exp $"
//
// Copyright 2001-2003 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
@@ -2978,7 +2978,7 @@ int Fl_Text_Display::handle(int event) {
case FL_LEAVE:
case FL_HIDE:
- if (active_r()) {
+ if (active_r() && window()) {
window()->cursor(FL_CURSOR_DEFAULT);
return 1;
@@ -3058,5 +3058,5 @@ int Fl_Text_Display::handle(int event) {
//
-// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.46 2003/08/24 13:09:06 easysw Exp $".
+// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.47 2003/11/01 01:07:07 easysw Exp $".
//
diff --git a/src/Fl_Tile.cxx b/src/Fl_Tile.cxx
index 3af8d2982..cb8d35269 100644
--- a/src/Fl_Tile.cxx
+++ b/src/Fl_Tile.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tile.cxx,v 1.5.2.5.2.4 2003/01/30 21:42:51 easysw Exp $"
+// "$Id: Fl_Tile.cxx,v 1.5.2.5.2.5 2003/11/01 01:07:07 easysw Exp $"
//
// Tile widget for the Fast Light Tool Kit (FLTK).
//
@@ -96,7 +96,7 @@ void Fl_Tile::resize(int X,int Y,int W,int H) {
static void set_cursor(Fl_Tile*t, Fl_Cursor c) {
static Fl_Cursor cursor;
- if (cursor == c) return;
+ if (cursor == c || !t->window()) return;
cursor = c;
#ifdef __sgi
t->window()->cursor(c,FL_RED,FL_WHITE);
@@ -196,5 +196,5 @@ int Fl_Tile::handle(int event) {
}
//
-// End of "$Id: Fl_Tile.cxx,v 1.5.2.5.2.4 2003/01/30 21:42:51 easysw Exp $".
+// End of "$Id: Fl_Tile.cxx,v 1.5.2.5.2.5 2003/11/01 01:07:07 easysw Exp $".
//
diff --git a/src/Fl_Wizard.cxx b/src/Fl_Wizard.cxx
index fdb6cfa18..697fc6965 100644
--- a/src/Fl_Wizard.cxx
+++ b/src/Fl_Wizard.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Wizard.cxx,v 1.1.2.5 2003/01/30 21:43:00 easysw Exp $"
+// "$Id: Fl_Wizard.cxx,v 1.1.2.6 2003/11/01 01:07:07 easysw Exp $"
//
// Fl_Wizard widget routines.
//
@@ -199,10 +199,10 @@ Fl_Wizard::value(Fl_Widget *kid)
// This will restore the mouse pointer to the window's default cursor
// whenever the wizard pane is changed. Otherwise text widgets that
// show the next pane may leave the cursor set to the I beam, etc...
- window()->cursor(FL_CURSOR_DEFAULT);
+ if (window()) window()->cursor(FL_CURSOR_DEFAULT);
}
//
-// End of "$Id: Fl_Wizard.cxx,v 1.1.2.5 2003/01/30 21:43:00 easysw Exp $".
+// End of "$Id: Fl_Wizard.cxx,v 1.1.2.6 2003/11/01 01:07:07 easysw Exp $".
//