From 5bc52d7bc7a3a9bac3fdfd72e84e280cd3af70af Mon Sep 17 00:00:00 2001 From: chme Date: Sun, 20 Nov 2016 06:38:53 +0100 Subject: [PATCH] [rsp] Fix nullpointer dereference found by scan-build --- src/RSP2SQL.g | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RSP2SQL.g b/src/RSP2SQL.g index 807e8e8e..c22b9312 100644 --- a/src/RSP2SQL.g +++ b/src/RSP2SQL.g @@ -112,7 +112,7 @@ expr returns [ pANTLR3_STRING result, int valid ] } | ^(NOT c = strcrit) { - if (!$c.valid) + if (!$c.valid || !$c.result) { $valid = 0; } @@ -131,7 +131,7 @@ expr returns [ pANTLR3_STRING result, int valid ] } | ^(NOT i = intcrit) { - if (!$i.valid) + if (!$i.valid || !$i.result) { $valid = 0; }