summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-07-23 08:21:28 +0300
committerMarc Mutz <marc.mutz@kdab.com>2019-07-26 12:18:47 +0300
commit6bc7309135ea6fc6c5d881e988b560e09825059d (patch)
tree1a4caf91dfd6a8f6dadfaee29d15f39a22ac1567 /src/network
parent0ce3f7d62b93427ca5d0f4284ba774691cbbd4a7 (diff)
QResource: fix nullptr-check gone tautological
Amends 136c5b9338f71775eb42528cfc7c23b2b4e5dff9. Before that change, each of the three members was a separate Q_GLOBAL_STATIC, so checking resourceList() for nullptr was the correct thing to do to find out whether the static was already destroyed. After the change, the resourceList() function will never return nullptr. Either resourceGlobalData.isDestroyed(), in which case dereferencing it asserts, or it isn't, in which case resourceList() returns a valid pointer. An explicit isDestroyed() check was added to the unregister function, but the register one was also checking resourceList() for nullptr, and this was left unprotected. Add the check and remove the now-tautological checks for nullptr resourceList(). Change-Id: I41fe66939ce858a77802b8af04c1de6e4fafe048 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/network')
0 files changed, 0 insertions, 0 deletions