diff options
Diffstat (limited to 'platform/qt')
-rw-r--r-- | platform/qt/app/mapwindow.cpp | 7 | ||||
-rw-r--r-- | platform/qt/app/mapwindow.hpp | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/platform/qt/app/mapwindow.cpp b/platform/qt/app/mapwindow.cpp index f6d5473192..390d89915a 100644 --- a/platform/qt/app/mapwindow.cpp +++ b/platform/qt/app/mapwindow.cpp @@ -22,6 +22,13 @@ MapWindow::MapWindow(const QMapboxGLSettings &settings) setWindowIcon(QIcon(":icon.png")); } +MapWindow::~MapWindow() +{ + // Make sure we have a valid context so we + // can delete the QMapboxGL. + makeCurrent(); +} + void MapWindow::selfTest() { if (m_bearingAnimation) { diff --git a/platform/qt/app/mapwindow.hpp b/platform/qt/app/mapwindow.hpp index c484114ec0..6c05f03562 100644 --- a/platform/qt/app/mapwindow.hpp +++ b/platform/qt/app/mapwindow.hpp @@ -29,6 +29,7 @@ class MapWindow : public QGLWidget public: MapWindow(const QMapboxGLSettings &); + ~MapWindow(); void selfTest(); |