Skip to content

Commit

Permalink
+ fix possible crash in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Sep 20, 2015
1 parent cda9bf9 commit 433efbc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Gui/BitmapFactory.cpp
Expand Up @@ -362,7 +362,11 @@ QPixmap BitmapFactoryInst::pixmapFromSvg(const QByteArray& contents, const QSize
return QPixmap();
}
frame->setContent(contents, QString::fromAscii("image/svg+xml"));
qApp->processEvents();
// Important to exclude user events here because otherwise
// it may happen that an item the icon is created for gets
// deleted in the meantime. This happens e.g. dragging over
// the categories in the commands panel very quickly.
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
webPage.setViewportSize(webPage.mainFrame()->contentsSize());

double ww = webPage.viewportSize().width();
Expand Down

0 comments on commit 433efbc

Please sign in to comment.