]> Dogcows Code - chaz/openbox/commitdiff
just return if a valid widget isnt found, racey to assert
authorDana Jansens <danakj@orodu.net>
Tue, 14 Jan 2003 22:58:35 +0000 (22:58 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 14 Jan 2003 22:58:35 +0000 (22:58 +0000)
src/actions.cc

index 10edeec2420a722a4a175167e04ce03c89786ba0..5a799a584c8fd7ab9c674fcd5ec5b0a72e9011ff 100644 (file)
@@ -74,7 +74,7 @@ void Actions::buttonPressHandler(const XButtonEvent &e)
   // run the PRESS python hook
   WidgetBase *w = dynamic_cast<WidgetBase*>
     (openbox->findHandler(e.window));
-  assert(w); // everything should be a widget
+  if (!w) return;
 
   // kill off the Button1Mask etc, only want the modifiers
   unsigned int state = e.state & (ControlMask | ShiftMask | Mod1Mask |
@@ -113,7 +113,7 @@ void Actions::buttonReleaseHandler(const XButtonEvent &e)
   
   WidgetBase *w = dynamic_cast<WidgetBase*>
     (openbox->findHandler(e.window));
-  assert(w); // everything should be a widget
+  if (!w) return;
 
   // not for the button we're watching?
   if (_button != e.button) return;
@@ -236,7 +236,7 @@ void Actions::motionHandler(const XMotionEvent &e)
 
   WidgetBase *w = dynamic_cast<WidgetBase*>
     (openbox->findHandler(e.window));
-  assert(w); // everything should be a widget
+  if (!w) return;
 
   // run the MOTION python hook
   // kill off the Button1Mask etc, only want the modifiers
This page took 0.027795 seconds and 4 git commands to generate.