From ffb2d92e9b4518abf84936bcb8a87dce92877c4a Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Mon, 29 Jul 2019 23:45:21 +0300 Subject: [PATCH] autotests: Prevent zero page access X11 clients might outlive Tabbox. Therefore we need to guard against that case. --- client.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client.cpp b/client.cpp index 451bc17806..4f9d8c7ee8 100644 --- a/client.cpp +++ b/client.cpp @@ -223,7 +223,7 @@ void Client::releaseWindow(bool on_shutdown) deleting = 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 @@ -299,7 +299,7 @@ void Client::destroyClient() deleting = 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