Resizing to an empty size followed by another resize leads to
sync() without having the context and the render control intialized.
This is wrong.
Task-number: QTBUG-39858
Change-Id: I5908723272165a656d192644cceb16ed253e6d3b
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
d->fakeHidden = true;
return;
}
- if (d->fakeHidden) {
+ if (d->fakeHidden && d->context) {
//restart rendering
d->fakeHidden = false;
d->renderControl->sync();
}
context->makeCurrent(d->offscreenSurface);
+
+ if (d->fakeHidden) {
+ d->fakeHidden = false;
+ d->renderControl->sync();
+ }
+
d->renderControl->render();
+
context->functions()->glFlush();
context->doneCurrent();
}