don't access array to check whether ptr is nullptr
Also unify with the below check whether array[0] is 0 (Was same condition and same branch) BUG: 341010
This commit is contained in:
parent
7747a38189
commit
50cbe810f5
1 changed files with 2 additions and 10 deletions
|
@ -123,16 +123,8 @@ void KscreenEffect::propertyNotify(EffectWindow *window, long int atom)
|
|||
}
|
||||
QByteArray byteData = effects->readRootProperty(m_atom, XCB_ATOM_CARDINAL, 32);
|
||||
auto *data = reinterpret_cast<uint32_t *>(byteData.data());
|
||||
if (!data[0]) {
|
||||
// Property was deleted
|
||||
if (m_state != StateNormal) {
|
||||
m_state = StateNormal;
|
||||
effects->addRepaintFull();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (data[0] == 0) {
|
||||
// normal state - KWin should have switched to it
|
||||
if (!data // Property was deleted
|
||||
|| data[0] == 0) { // normal state - KWin should have switched to it
|
||||
if (m_state != StateNormal) {
|
||||
m_state = StateNormal;
|
||||
effects->addRepaintFull();
|
||||
|
|
Loading…
Reference in a new issue