From 194591da98e90f7452bc3b583e35892baba67a9f Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 15 May 2014 15:02:38 -0400 Subject: [PATCH] C++: Fix potential null pointer dereference Change-Id: I38d99b27ff76f44535c02c64886bede0a99c6225 Reviewed-by: Erik Verbruggen --- src/libs/3rdparty/cplusplus/Matcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/3rdparty/cplusplus/Matcher.cpp b/src/libs/3rdparty/cplusplus/Matcher.cpp index 447bec51184..e713394bdd7 100644 --- a/src/libs/3rdparty/cplusplus/Matcher.cpp +++ b/src/libs/3rdparty/cplusplus/Matcher.cpp @@ -47,7 +47,7 @@ bool Matcher::match(const Type *type, const Type *otherType, Matcher *matcher) { if (type == otherType) return true; - if (!type) + if (!type || !otherType) return false; return type->match0(otherType, matcher);