Fix crash caused by repeated kicks of an already-kicked client
authorMichael Marley <michael@michaelmarley.com>
Wed, 9 May 2018 03:17:21 +0000 (23:17 -0400)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 6 Jun 2018 17:37:44 +0000 (19:37 +0200)
commitab8127d2193d7d9de9e41b9f454911fdd07e49df
tree8ab526bd5a45dd26be16873626a0204b50b3f3f7
parent744080e8b9e6d32aaeb3d08eaf1a576076735957
Fix crash caused by repeated kicks of an already-kicked client

As it turns out, the QHash[] operator implicitly adds nullptrs to
the map when called with a nonexistent key.  If a user clicked the
button to kick another client multiple times, this would cause a
nullptr to be inserted into the peerMap, then causing a crash later
on at least when another client connected.  To solve the problem,
the value() method is used instead, which has no such side-effect.
A big thanks to @digitalcircuit for discovering this behavior.
src/common/signalproxy.cpp