diff --git a/src/qtgui/glwidget.cpp b/src/qtgui/glwidget.cpp index 2c810285..b7b271b7 100644 --- a/src/qtgui/glwidget.cpp +++ b/src/qtgui/glwidget.cpp @@ -795,7 +795,7 @@ void GLWidget::wheelEvent(QWheelEvent *event) { } void GLWidget::mousePressEvent(QMouseEvent *event) { - if (!m_preview->isRunning()) + if (!m_preview->isRunning() || m_context == NULL || m_context->scene == NULL) return; m_mousePos = event->pos(); m_initialMousePos = mapToGlobal(m_mousePos);