QOpenGLWidget: Avoid crashing if updateGL is called before the first resize

Change-Id: I9e7788334de98b35dc5d6beee97a63783a1fe267
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
Jocelyn Turcotte 2014-04-08 18:16:37 +02:00 committed by The Qt Project
parent 1d58ec346a
commit 04f6dffbf9

View File

@ -147,6 +147,9 @@ void QOpenGLWidget::paintGL()
void QOpenGLWidget::updateGL()
{
Q_D(QOpenGLWidget);
if (d->uninitialized)
return;
makeCurrent();
paintGL();
d->context.functions()->glFlush();