Fix crash when closing extra editor windows.

Change-Id: If1aaceabedc76bb82e90eecb2a83f07c5d114d02
Reviewed-by: David Schulz <david.schulz@digia.com>