forked from qt-creator/qt-creator
ICore: Fix possible crash in raiseWindow()
Don't call else branch with nullptr when window is nullptr.
Amends 79be19a8a0
Change-Id: I4c1ee3783d36374cbc6ad9555328b5737f2ce348
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -720,7 +720,9 @@ void ICore::raiseWindow(QWidget *widget)
|
||||
if (!widget)
|
||||
return;
|
||||
QWidget *window = widget->window();
|
||||
if (window && window == m_mainwindow) {
|
||||
if (!window)
|
||||
return;
|
||||
if (window == m_mainwindow) {
|
||||
m_mainwindow->raiseWindow();
|
||||
} else {
|
||||
window->raise();
|
||||
|
Reference in New Issue
Block a user