summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-01-26 12:21:47 +0100
committerPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-02-01 13:34:24 +0000
commit3641cecaa91c9e480fe070572a3ec72cfef2ba3c (patch)
treecac52be6b298ed4f293423048d67d7f8a05c5a85
parenta41bd80784a01050dfb6b888cd90505259471f4f (diff)
downloadqtlocation-3641cecaa91c9e480fe070572a3ec72cfef2ba3c.tar.gz
Fix for mapviewer example minimap crash
The mapviewer example crashes when the minimap is set to be shown. The problem is a null pointer dereferencing in qquickgeomapgesturearea.cpp Task-number: QTBUG-50519 Change-Id: I133585e4276a861951aec185c1ce120e76638c5d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r--src/imports/location/qquickgeomapgesturearea.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/imports/location/qquickgeomapgesturearea.cpp b/src/imports/location/qquickgeomapgesturearea.cpp
index 70dffc19..9bb8068b 100644
--- a/src/imports/location/qquickgeomapgesturearea.cpp
+++ b/src/imports/location/qquickgeomapgesturearea.cpp
@@ -1202,6 +1202,8 @@ bool QQuickGeoMapGestureArea::tryStartFlick()
*/
void QQuickGeoMapGestureArea::startFlick(int dx, int dy, int timeMs)
{
+ if (!m_flick.m_animation)
+ return;
if (timeMs < 0)
return;
@@ -1255,6 +1257,8 @@ void QQuickGeoMapGestureArea::stopPan()
*/
void QQuickGeoMapGestureArea::stopFlick()
{
+ if (!m_flick.m_animation)
+ return;
m_velocityX = 0;
m_velocityY = 0;
if (m_flick.m_animation->isRunning())