diff --git a/src/shared/cplusplus/Literals.cpp b/src/shared/cplusplus/Literals.cpp
index 83457137982902c6e4841bf327dc721f3d219ec4..0f21e379cf8a143e1b4bd9a0c1801d2e434622e8 100644
--- a/src/shared/cplusplus/Literals.cpp
+++ b/src/shared/cplusplus/Literals.cpp
@@ -122,7 +122,9 @@ Identifier::~Identifier()
 
 bool Identifier::isEqualTo(const Identifier *other) const
 {
-    if (this == other)
+    if (! other)
+        return false;
+    else if (this == other)
         return true;
     else if (hashCode() != other->hashCode())
         return false;