Fix errors when installer is started without gui

When the maintenance tool is e.g. started with --checkupdates
there will be no 'gui' object in context. Do just silently
ignore the error in this case.

Task-number: QTBUG-35473
Change-Id: I99b83c2a1e478c6acb9c934148c044480ce01597
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>