diff options
| author | 2019-07-25 22:29:20 +0200 | |
|---|---|---|
| committer | 2019-07-25 22:29:20 +0200 | |
| commit | 8b04d886845be5c3b57caae4d96b53133c51ab14 (patch) | |
| tree | 0c22e33e8f9246b38dd1cac901b0ea11fc19ca07 /parsingtoolbox.cpp | |
| parent | 611aa0defd63ebc3b4e3d16a86c495a9af120728 (diff) | |
| download | OneRoll-8b04d886845be5c3b57caae4d96b53133c51ab14.tar.gz OneRoll-8b04d886845be5c3b57caae4d96b53133c51ab14.zip | |
Fix crash found by afl
Diffstat (limited to 'parsingtoolbox.cpp')
| -rw-r--r-- | parsingtoolbox.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/parsingtoolbox.cpp b/parsingtoolbox.cpp index 702019d..2453eb7 100644 --- a/parsingtoolbox.cpp +++ b/parsingtoolbox.cpp @@ -204,13 +204,17 @@ Validator* ParsingToolBox::readValidator(QString& str, bool hasSquare) { OperationCondition* condition= new OperationCondition(); condition->setValueNode(operandNode); - Validator* valid= readValidator(str,hasSquare); + Validator* valid= readValidator(str, hasSquare); BooleanCondition* boolC= dynamic_cast<BooleanCondition*>(valid); if(nullptr != boolC) { condition->setBoolean(boolC); + returnVal= condition; + } + else + { + delete condition; } - returnVal= condition; } } else if(readOperand(str, operandNode)) |