summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/statemachine/qstate.cpp4
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)) {