diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-05-04 13:44:39 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-05-04 13:45:58 (GMT) |
commit | e2cb1fe3f71a0fd74c49af2fc451a1e05ed2742b (patch) | |
tree | 898ab6d109cb3afe6e035e13152f89d926a97367 /src | |
parent | 1e4e05144dd8a0c642b6a7f77aa53fa6975d89d9 (diff) | |
download | Qt-e2cb1fe3f71a0fd74c49af2fc451a1e05ed2742b.zip Qt-e2cb1fe3f71a0fd74c49af2fc451a1e05ed2742b.tar.gz Qt-e2cb1fe3f71a0fd74c49af2fc451a1e05ed2742b.tar.bz2 |
ignore QState::assignProperty() calls where the target object is 0
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/statemachine/qstate.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp index 2d59ab8..a431888 100644 --- a/src/corelib/statemachine/qstate.cpp +++ b/src/corelib/statemachine/qstate.cpp @@ -235,6 +235,10 @@ void QState::assignProperty(QObject *object, const char *name, const QVariant &value) { Q_D(QState); + if (!object) { + qWarning("QState::assignProperty: cannot assign property '%s' of null object", name); + return; + } for (int i = 0; i < d->propertyAssignments.size(); ++i) { QPropertyAssignment &assn = d->propertyAssignments[i]; if ((assn.object == object) && (assn.propertyName == name)) { |