GUI crash bugfix

metadata
Wenzel Jakob 2011-10-16 03:22:48 -04:00
parent 7f71397b82
commit 7ec713347f
1 changed files with 3 additions and 2 deletions

View File

@ -779,10 +779,11 @@ void GLWidget::mouseMoveEvent(QMouseEvent *event) {
}
void GLWidget::wheelEvent(QWheelEvent *event) {
if (!m_preview->isRunning() || m_context == NULL || m_context->scene == NULL || m_animation)
return;
QScrollBar *bar = event->orientation() == Qt::Vertical
? m_vScroll : m_hScroll;
if (!m_preview->isRunning() || m_animation)
return;
if (bar->isVisible()) {
int oldStep = bar->singleStep();