[qt] Fix crash on the example app when launching multiple windows
We need to have a valid context when destroying QMapboxGL.
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -29,6 +29,7 @@ class MapWindow : public QGLWidget
|
||||
|
||||
public:
|
||||
MapWindow(const QMapboxGLSettings &);
|
||||
~MapWindow();
|
||||
|
||||
void selfTest();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user