diff --git a/src/Gui/Quarter/QuarterWidget.cpp b/src/Gui/Quarter/QuarterWidget.cpp index 7d3addb303..f06dd0f73e 100644 --- a/src/Gui/Quarter/QuarterWidget.cpp +++ b/src/Gui/Quarter/QuarterWidget.cpp @@ -886,7 +886,11 @@ void QuarterWidget::paintEvent(QPaintEvent* event) glMatrixMode(GL_PROJECTION); QtGLWidget* w = static_cast(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