Fix crash on product disabling.

Task-number: QBS-561
Change-Id: Ia56280cb26241c7fb9debd0d4ce1349b041405a6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>