Skip to content

Commit

Permalink
Guard against calling QWindow::requestUpdate() on non-GUI threads
Browse files Browse the repository at this point in the history
Change-Id: I851ff672bc234146deb61615fc7c56df87d62065
Reviewed-by: Laszlo Agocs <[email protected]>
Reviewed-by: Timur Pocheptsov <[email protected]>
  • Loading branch information
torarnv authored and Tor Arne Vestbø committed Aug 30, 2016
1 parent 17e5d9d commit ce2815b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/kernel/qwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2160,6 +2160,9 @@ void QWindowPrivate::deliverUpdateRequest()
*/
void QWindow::requestUpdate()
{
Q_ASSERT_X(QThread::currentThread() == QCoreApplication::instance()->thread(),
"QWindow", "Updates can only be scheduled from the GUI (main) thread");

Q_D(QWindow);
if (d->updateRequestPending || !d->platformWindow)
return;
Expand Down

0 comments on commit ce2815b

Please sign in to comment.