diff options
| author | 2018-12-28 23:28:12 +0100 | |
|---|---|---|
| committer | 2019-01-13 16:30:03 +0100 | |
| commit | 1b6a7113d9cbcfcd7f5f8b21b0085f97c010a6f3 (patch) | |
| tree | 648ecc5ea39ba19290b772be578e59b82525da44 /node/paintnode.cpp | |
| parent | 0fcbfc01baf4dc8fc42fe9a40033be14808c2c7f (diff) | |
| download | OneRoll-1b6a7113d9cbcfcd7f5f8b21b0085f97c010a6f3.tar.gz OneRoll-1b6a7113d9cbcfcd7f5f8b21b0085f97c010a6f3.zip | |
-add error when previous is null.
Diffstat (limited to 'node/paintnode.cpp')
| -rw-r--r-- | node/paintnode.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/node/paintnode.cpp b/node/paintnode.cpp index 79aee60..8fea3f4 100644 --- a/node/paintnode.cpp +++ b/node/paintnode.cpp @@ -69,6 +69,7 @@ void PainterNode::run(ExecutionNode* previous) m_previousNode = previous; if(nullptr==previous) { + m_errors.insert(ExecutionNode::NO_PREVIOUS_ERROR, QObject::tr("No previous node before Paint operator")); return; } Result* previousResult = previous->getResult(); @@ -97,7 +98,7 @@ void PainterNode::run(ExecutionNode* previous) } Result* PainterNode::getResult() { - return m_previousNode->getResult(); + return (nullptr != m_previousNode) ? m_previousNode->getResult() : nullptr ; } QString PainterNode::toString(bool wl) const |