diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index d44bfabc04..c7afcce874 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1279,6 +1279,10 @@ void QWindow::setTransientParent(QWindow *parent) qWarning() << parent << "must be a top level window."; return; } + if (parent == this) { + qWarning() << "transient parent" << parent << "can not be same as window"; + return; + } d->transientParent = parent;