From b1c105e77eba857bbb1368f6748a496c703a62d2 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 2 Mar 2009 18:01:33 +0000 Subject: (svn r15598) -Fix [FS#2695]: crash when opening viewport while scrolling the map and the mouse 'lands' on the window decoration of the viewport. --- src/smallmap_gui.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/smallmap_gui.cpp') diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index f2ef2ee04..c113b4811 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1176,12 +1176,8 @@ public: virtual void OnScroll(Point delta) { - ViewPort *vp = IsPtInWindowViewport(this, _cursor.pos.x, _cursor.pos.y); - - if (vp == NULL) { - _cursor.fix_at = false; - _scrolling_viewport = false; - } + const ViewPort *vp = IsPtInWindowViewport(this, _cursor.pos.x, _cursor.pos.y); + if (vp == NULL) return; this->viewport->scrollpos_x += ScaleByZoom(delta.x, vp->zoom); this->viewport->scrollpos_y += ScaleByZoom(delta.y, vp->zoom); -- cgit v1.2.3-54-g00ecf