Changeset - r13561:cb473daf8c03
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-11-15 13:50:49
rubidium@openttd.org
(svn r18093) -Fix: the mouseover handler could crash if there wasn't a widget under the mouse
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/window.cpp
Show inline comments
 
@@ -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 */
0 comments (0 inline, 0 general)