QmlDesigner.Model: Crash fix

We have to check if the currentNode is actually valid.

Change-Id: I7a36758e96cbb4ae2a17755fc841ee2518a01ca2
Reviewed-by: Marco Bubke <marco.bubke@digia.com>