diff --git a/shell_client.cpp b/shell_client.cpp index aa5625d78a..fd2edaef19 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -418,7 +418,7 @@ void ShellClient::destroyClient() m_closing = true; #ifdef KWIN_BUILD_TABBOX TabBox::TabBox *tabBox = TabBox::TabBox::self(); - if (tabBox->isDisplayed() && tabBox->currentClient() == this) { + if (tabBox && tabBox->isDisplayed() && tabBox->currentClient() == this) { tabBox->nextPrev(true); } #endif