summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2003-04-09 03:57:06 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2003-04-09 03:57:06 +0000
commit78262d8047e347cad3710b383af7f5e9ead88a96 (patch)
tree1b0663d8e9f04da847a100e15f5bfaa851d4066b /src
parent67af078c9c470dfc1bac3d5105a0b5cc4f1c63e5 (diff)
Fix coredump problem in Fl::send() function...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2970 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index 36ec180c4..3c3684629 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl.cxx,v 1.24.2.41.2.59 2003/01/30 21:41:14 easysw Exp $"
+// "$Id: Fl.cxx,v 1.24.2.41.2.60 2003/04/09 03:57:06 easysw Exp $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@@ -545,8 +545,13 @@ void fl_throw_focus(Fl_Widget *o) {
// values to account for nested X windows. 'window' is the outermost
// window the event was posted to by X:
static int send(int event, Fl_Widget* to, Fl_Window* window) {
- int dx = window->x();
- int dy = window->y();
+ int dx, dy;
+ if (window) {
+ dx = window->x();
+ dy = window->y();
+ } else {
+ dx = dy = 0;
+ }
for (const Fl_Widget* w = to; w; w = w->parent())
if (w->type()>=FL_WINDOW) {dx -= w->x(); dy -= w->y();}
int save_x = Fl::e_x; Fl::e_x += dx;
@@ -975,5 +980,5 @@ void Fl_Window::flush() {
}
//
-// End of "$Id: Fl.cxx,v 1.24.2.41.2.59 2003/01/30 21:41:14 easysw Exp $".
+// End of "$Id: Fl.cxx,v 1.24.2.41.2.60 2003/04/09 03:57:06 easysw Exp $".
//