[rsp] Fix nullpointer dereference found by scan-build

This commit is contained in:
chme 2016-11-20 06:38:53 +01:00
parent a95da7966b
commit 5bc52d7bc7

View File

@ -112,7 +112,7 @@ expr returns [ pANTLR3_STRING result, int valid ]
} }
| ^(NOT c = strcrit) | ^(NOT c = strcrit)
{ {
if (!$c.valid) if (!$c.valid || !$c.result)
{ {
$valid = 0; $valid = 0;
} }
@ -131,7 +131,7 @@ expr returns [ pANTLR3_STRING result, int valid ]
} }
| ^(NOT i = intcrit) | ^(NOT i = intcrit)
{ {
if (!$i.valid) if (!$i.valid || !$i.result)
{ {
$valid = 0; $valid = 0;
} }