summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/wanode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src/wanode.cpp')
-rw-r--r--protocols/WhatsApp/src/wanode.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/WhatsApp/src/wanode.cpp b/protocols/WhatsApp/src/wanode.cpp
index cbe9408f20..8d5a2ef7f0 100644
--- a/protocols/WhatsApp/src/wanode.cpp
+++ b/protocols/WhatsApp/src/wanode.cpp
@@ -104,6 +104,9 @@ WANode *WANode::addChild(const char *pszName)
WANode* WANode::getChild(const char *pszName) const
{
+ if (this == nullptr)
+ return nullptr;
+
for (auto &it : children)
if (it->title == pszName)
return it;