diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/openglwidgets/qopenglwidget.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/openglwidgets/qopenglwidget.cpp b/src/openglwidgets/qopenglwidget.cpp index d56a5e16cd..459bcdd25a 100644 --- a/src/openglwidgets/qopenglwidget.cpp +++ b/src/openglwidgets/qopenglwidget.cpp @@ -1264,6 +1264,9 @@ void QOpenGLWidget::resizeEvent(QResizeEvent *e) return; d->recreateFbo(); + // Make sure our own context is current before invoking user overrides. If + // the fbo was recreated then there's a chance something else is current now. + makeCurrent(); resizeGL(width(), height()); d->sendPaintEvent(QRect(QPoint(0, 0), size())); } |