diff options
| author | 2015-04-01 00:28:17 +0200 | |
|---|---|---|
| committer | 2015-04-01 00:28:17 +0200 | |
| commit | 60a0e524561ae86c9509c61b00a5d8ba40a1d7ee (patch) | |
| tree | cd60b92368403a806ee8e7bcb00b41e5000722f1 /parsingtoolbox.cpp | |
| parent | 5bd5a8a07a900c013c120b4e228c766a84a05b09 (diff) | |
| download | OneRoll-60a0e524561ae86c9509c61b00a5d8ba40a1d7ee.tar.gz OneRoll-60a0e524561ae86c9509c61b00a5d8ba40a1d7ee.zip | |
-Better understanding of validators toString method
-return error if error have been detected for endless loop.
-add listaliasnode.h/.cpp to the pri file
-protect the use of pointer
Diffstat (limited to 'parsingtoolbox.cpp')
| -rw-r--r-- | parsingtoolbox.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/parsingtoolbox.cpp b/parsingtoolbox.cpp index f276abf..e03690e 100644 --- a/parsingtoolbox.cpp +++ b/parsingtoolbox.cpp @@ -204,7 +204,14 @@ bool ParsingToolBox::readAscending(QString& str) bool ParsingToolBox::isValidValidator(ExecutionNode* previous, Validator* val) { DiceRollerNode* node = getDiceRollerNode(previous); - return (val->getValidRangeSize(node->getFaces())<node->getFaces()); + if(NULL!=node) + { + return (val->getValidRangeSize(node->getFaces())<node->getFaces()); + } + else + { + return true; + } } DiceRollerNode* ParsingToolBox::getDiceRollerNode(ExecutionNode* previous) { |