X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Factions.cc;h=5a799a584c8fd7ab9c674fcd5ec5b0a72e9011ff;hb=a38a8f0bac02d9f615b769026fd72567c1ac6c91;hp=10edeec2420a722a4a175167e04ce03c89786ba0;hpb=cdcc526a0274cace9f542960fe4eee4ddcc23d31;p=chaz%2Fopenbox diff --git a/src/actions.cc b/src/actions.cc index 10edeec2..5a799a58 100644 --- a/src/actions.cc +++ b/src/actions.cc @@ -74,7 +74,7 @@ void Actions::buttonPressHandler(const XButtonEvent &e) // run the PRESS python hook WidgetBase *w = dynamic_cast (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 (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 (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