aboutsummaryrefslogtreecommitdiff
path: root/lib/events/event.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-11 18:16:39 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-11 18:16:39 +0900
commit1ffb27f506ed1a4b3766768b872a86af7799a39e (patch)
treeb87c0b36d5da179bc41182598c1253986189de58 /lib/events/event.h
parentd714e47dd713d89d1581dbad1a8e751fcf5fa2e4 (diff)
downloadlibquotient-1ffb27f506ed1a4b3766768b872a86af7799a39e.tar.gz
libquotient-1ffb27f506ed1a4b3766768b872a86af7799a39e.zip
EventFactory::make() should return nullptr in case of failure
Otherwise factory chaining doesn't work right (an unknown event returned by a chained factory is treated as successful parsing).
Diffstat (limited to 'lib/events/event.h')
-rw-r--r--lib/events/event.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/events/event.h b/lib/events/event.h
index a205b1b4..8eb4ee88 100644
--- a/lib/events/event.h
+++ b/lib/events/event.h
@@ -166,7 +166,7 @@ namespace QMatrixClient
for (const auto& f: factories())
if (auto e = f(json, matrixType))
return e;
- return makeEvent<BaseEventT>(unknownEventTypeId(), json);
+ return nullptr;
}
private: