Fix crash on unloading project

This code path is taken if there's only one project open.

Task-number: QTCREATORBUG-13569
Change-Id: If39c451b8d471df4a178610e986c9f35703746a7
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>