reset the transientInfo id when cleaning group

otherwise a pseudo-transient window with no
group causes a nullptr deref in eg. mainClients

BUG: 352483
FIXED-IN: 5.4.2
REVIEW: 125122
This commit is contained in:
Thomas Lübking 2015-09-09 21:45:55 +02:00
parent 584850f160
commit 295132deef

View file

@ -672,6 +672,7 @@ void Client::cleanGrouping()
// it != group_members.end(); // it != group_members.end();
// ++it ) // ++it )
// qDebug() << "CL4:" << *it; // qDebug() << "CL4:" << *it;
m_transientForId = XCB_WINDOW_NONE;
} }
// Make sure that no group transient is considered transient // Make sure that no group transient is considered transient
@ -886,6 +887,7 @@ ClientList Client::mainClients() const
if (transientFor() != NULL) if (transientFor() != NULL)
return ClientList() << const_cast< Client* >(transientFor()); return ClientList() << const_cast< Client* >(transientFor());
ClientList result; ClientList result;
Q_ASSERT(group());
for (ClientList::ConstIterator it = group()->members().constBegin(); for (ClientList::ConstIterator it = group()->members().constBegin();
it != group()->members().constEnd(); it != group()->members().constEnd();
++it) ++it)