summaryrefslogtreecommitdiff
path: root/src/Fl_Input_.cxx
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2002-08-13 22:43:59 +0000
committerBill Spitzak <spitzak@gmail.com>2002-08-13 22:43:59 +0000
commitab9c8fe152dbd93704043d82cb85f44cfad87745 (patch)
treec0863527aa785b66dc741b1430d61755abb0ae52 /src/Fl_Input_.cxx
parentf0ea022d0ee8bc3d039f3111430b65178d46aea4 (diff)
Typo found by Albrecht Schlo�er fixed. This would crash fltk when a
window is iconized. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2581 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Input_.cxx')
-rw-r--r--src/Fl_Input_.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx
index c3572a870..1c7034279 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.23 2002/08/13 15:42:44 easysw Exp $"
+// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.24 2002/08/13 22:43:59 spitzak Exp $"
//
// Common input widget routines for the Fast Light Tool Kit (FLTK).
//
@@ -709,6 +709,7 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) {
const char* t = Fl::event_text();
const char* e = t+Fl::event_length();
if (input_type() != FL_MULTILINE_INPUT) while (e > t && isspace(*(e-1))) e--;
+ if (!t || e <= t) return 1; // Int/float stuff will crash without this test
if (input_type() == FL_INT_INPUT) {
while (isspace(*t) && t < e) t ++;
const char *p = t;
@@ -850,5 +851,5 @@ Fl_Input_::~Fl_Input_() {
}
//
-// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.23 2002/08/13 15:42:44 easysw Exp $".
+// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.24 2002/08/13 22:43:59 spitzak Exp $".
//