summaryrefslogtreecommitdiffstats
path: root/src/scxml
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2017-08-15 13:04:54 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2017-08-15 13:53:59 +0000
commit5a4550879d30d1897e9b62e4fb73e7392c4182b8 (patch)
tree18f55796e870b03ce268bb50c589c5f38097d3c8 /src/scxml
parent8af8db3810ec2d8d2d923f39e23512d30ae234d9 (diff)
Fix the crash when sending an event into not running sevice
Task-number: QTBUG-61484 Change-Id: I3cebb3378a73d16901b18ec9465bcacf2e5ad486 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/scxml')
-rw-r--r--src/scxml/qscxmlstatemachine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scxml/qscxmlstatemachine.cpp b/src/scxml/qscxmlstatemachine.cpp
index 9767a03..cc190fb 100644
--- a/src/scxml/qscxmlstatemachine.cpp
+++ b/src/scxml/qscxmlstatemachine.cpp
@@ -2198,7 +2198,7 @@ bool QScxmlStateMachine::isDispatchableTarget(const QString &target) const
if (target.startsWith(QStringLiteral("#_"))) {
QStringRef targetId = target.midRef(2);
for (auto invokedService : d->m_invokedServices) {
- if (invokedService.service->id() == targetId)
+ if (invokedService.service && invokedService.service->id() == targetId)
return true;
}
}