Fix android crash

This commit is contained in:
Brad Davis 2018-10-26 11:23:04 -07:00
parent 36edb939c3
commit a3a952265a
2 changed files with 2 additions and 0 deletions

View file

@ -88,6 +88,7 @@ public:
// Move the OpenGL context to the present thread
// Extra code because of the widget 'wrapper' context
_context = context;
_context->doneCurrent();
_context->moveToThread(this);
}

View file

@ -73,6 +73,7 @@ bool OffscreenGLCanvas::create(QOpenGLContext* sharedContext) {
if (!_context->makeCurrent(_offscreenSurface)) {
qFatal("Unable to make offscreen surface current");
}
_context->doneCurrent();
#else
if (!_offscreenSurface->isValid()) {
qFatal("Offscreen surface is invalid");