Diffusion Krita 2a391d814b0a

Fix assert on Node::parentNode() for root

Authored by tymond on Apr 20 2020, 1:07 AM.

Description

Fix assert on Node::parentNode() for root

Before this commit, because of both parentNode() not checking
for parent() existing and createNode() not checking for the node
existing (which in this case was originalNode->parent()),
trying to access parentNode() of root node would result in an assert
or crash.
This commit fixes that behaviour in both places.

BUG:420317