[skip ci] issue #0004164, issue #0004237: macOS crash when opening project from 'Recent files'

This commit is contained in:
wmayer
2020-01-03 16:14:55 +01:00
parent 141c3bca53
commit 402aca93af

View File

@@ -886,7 +886,11 @@ void QuarterWidget::paintEvent(QPaintEvent* event)
glMatrixMode(GL_PROJECTION);
QtGLWidget* w = static_cast<QtGLWidget*>(this->viewport());
assert(w->isValid() && "No valid GL context found!");
if (!w->isValid()) {
qWarning() << "No valid GL context found!";
return;
}
//assert(w->isValid() && "No valid GL context found!");
// We might have to process the delay queue here since we don't know
// if paintGL() is called from Qt, and we might have some sensors
// waiting to trigger (the redraw sensor has a lower priority than a