diff --git a/src/frontends/qt/GuiSearch.cpp b/src/frontends/qt/GuiSearch.cpp index e387ce8ee6..f12d42c11d 100644 --- a/src/frontends/qt/GuiSearch.cpp +++ b/src/frontends/qt/GuiSearch.cpp @@ -649,9 +649,10 @@ void GuiSearch::updateTitle() // remove title bar setTitleBarWidget(new QWidget()); titleBarWidget()->hide(); - } else + } else if (titleBarWidget()) { // restore title bar setTitleBarWidget(nullptr); + } }