aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppMessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/QXmppMessage.cpp')
-rw-r--r--src/base/QXmppMessage.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/base/QXmppMessage.cpp b/src/base/QXmppMessage.cpp
index 16c0a1a7..41b654ed 100644
--- a/src/base/QXmppMessage.cpp
+++ b/src/base/QXmppMessage.cpp
@@ -1247,7 +1247,9 @@ bool QXmppMessage::parseExtension(const QDomElement &element, QXmpp::SceMode sce
// XEP-0334: Message Processing Hints
if (element.namespaceURI() == ns_message_processing_hints &&
HINT_TYPES.contains(element.tagName())) {
- addHint(Hint(1 << HINT_TYPES.indexOf(element.tagName())));
+ if (const auto index = HINT_TYPES.indexOf(element.tagName()); index >= 0) {
+ addHint(Hint(1 << index));
+ }
return true;
}
// XEP-0359: Unique and Stable Stanza IDs