processcore: Properly check if process exists before dereferencing
Q_ASSERT will only trigger in debug builds. In release builds we can therefore still dereference a potential null pointer, so do a proper check instead since there are places where we pass a process' parent without checking if that parent exists.
(cherry picked from commit 560d8dad)
Co-authored-by: Arjen Hiemstra ahiemstra@heimr.nl