Do not disconnect with nullptr when unplugging screens
Task-number: QTBUG-42803 Change-Id: I080ec3f0cc2cb55b43a9b8792f03b002b2e0f982 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
This commit is contained in:
parent
4faadb3ad3
commit
41a0be329c
@ -510,8 +510,10 @@ void QOpenGLContext::setScreen(QScreen *screen)
|
||||
void QOpenGLContextPrivate::_q_screenDestroyed(QObject *object)
|
||||
{
|
||||
Q_Q(QOpenGLContext);
|
||||
if (object == static_cast<QObject *>(screen))
|
||||
if (object == static_cast<QObject *>(screen)) {
|
||||
screen = 0;
|
||||
q->setScreen(0);
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user