autotests: Prevent zero page access

X11 clients might outlive Tabbox. Therefore we need to guard against
that case.
icc-effect-5.17.5
Vlad Zagorodniy 2019-07-29 23:45:21 +03:00
parent e110b126f7
commit ffb2d92e9b
1 changed files with 2 additions and 2 deletions

View File

@ -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