# HG changeset patch # User rubidium # Date 2009-11-15 13:50:49 # Node ID cb473daf8c0380c1bdbed91d7e053c1569a01100 # Parent 251ed15297e0ac23d3333e48a65283e0b1db1415 (svn r18093) -Fix: the mouseover handler could crash if there wasn't a widget under the mouse diff --git a/src/window.cpp b/src/window.cpp --- a/src/window.cpp +++ b/src/window.cpp @@ -1333,8 +1333,8 @@ static bool HandleMouseOver() if (w != NULL) { /* send an event in client coordinates. */ Point pt = { _cursor.pos.x - w->left, _cursor.pos.y - w->top }; - int widget = w->nested_root->GetWidgetFromPos(pt.x, pt.y)->index; - w->OnMouseOver(pt, widget); + const NWidgetCore *widget = w->nested_root->GetWidgetFromPos(pt.x, pt.y); + if (widget != NULL) w->OnMouseOver(pt, widget->index); } /* Mouseover never stops execution */