setupRunEnvironment: Do not access properties of undefined values
setupRunEnvironment: Do not access properties of undefined values

Task-number: QBS-1290
Change-Id: I47d89ac2bd1cd88a0f38f51c1ce81517a276725b
Reviewed-by: David Schulz <f07954e8cc0c222cd136162588d217f330598215@qt.io>
Reviewed-by: Jake Petroules <2d627e1cecd5435752fa500bacbe05f7cc90c369@qt.io>

qt-labs/qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qt-labs/qbs