summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine/qhistorystate.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-01-08 14:52:01 +0100
committerMarc Mutz <marc.mutz@kdab.com>2015-01-09 12:06:15 +0100
commit65eb57392685d69313217fd17e06376db8f9c05b (patch)
treeabdf5ee302138a0abd26f1ac5579ebfbfb1f9f05 /src/corelib/statemachine/qhistorystate.cpp
parent3ecc44d5d26de661eaaaf4164092b2941f5dd615 (diff)
QStateMachine: fix some misleading code
The old code creates a RestorableId from the passed (QObject*, QByteArray) and used it for lookup in a hash table (ok) and as a container for the (QObject*, QByteArray), satisfying later references to those parameters from the RestorableId instance instead of using the parameters directly. Now, RestorableId holds the QObject* in a QPointer, so the code might have wanted to detect the object being destroyed as part of the operation, BUT: a) the operation is a read-only one, and b) the code didn't check for nullness before dereferencing the QObject*. Fix by moving the creation of the RestorableId into the scope it's used and otherwise using the parameters directly. Change-Id: Iaf12f722fe6841ee1a55037fe33a6115aa699aca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/statemachine/qhistorystate.cpp')
0 files changed, 0 insertions, 0 deletions