summaryrefslogtreecommitdiff
path: root/platform/qt/app/mapwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/qt/app/mapwindow.cpp')
-rw-r--r--platform/qt/app/mapwindow.cpp7
1 files changed, 7 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) {