diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-03-29 15:26:12 +0300 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-03-29 12:28:27 +0000 |
commit | 20a7d7b265742c3eea8d080e6710bf7bd2cb5bdd (patch) | |
tree | 4917f12e991c0cb1be3cae78179da17596e89b10 /src/plugins/geoservices/mapboxgl | |
parent | a7cadd6f5f5278220847dcb2c4897a3c40896ea3 (diff) | |
download | qtlocation-20a7d7b265742c3eea8d080e6710bf7bd2cb5bdd.tar.gz |
Prevent creating the Mapbox GL node map if size is empty
Change-Id: I3fe2c7fecd8cf8036f84fed5c4875e39d937c9cd
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src/plugins/geoservices/mapboxgl')
-rw-r--r-- | src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp index 74bea76a..563c84f2 100644 --- a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp +++ b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp @@ -91,6 +91,11 @@ QSGNode *QGeoMapMapboxGLPrivate::updateSceneGraph(QSGNode *node, QQuickWindow *w { Q_Q(QGeoMapMapboxGL); + if (m_viewportSize.isEmpty()) { + delete node; + return 0; + } + QMapboxGL *map = 0; if (m_useFBO) { if (!node) { |