Designer: Fix crash

Introduced by a3608f595ad13f8925ad797da8ca7ddec6e36051

Task-number: QTCREATORBUG-11267
Change-Id: I1cb09dd18ed49fcbbfe0d9890d971e7ca4e93ba5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>