XCodeHelper: fix null exception when trying to get the ID or name of the selected iOS simulator
Ideally, it shouldn't return null, but if it does, fail gracefully
This commit is contained in:
@@ -101,12 +101,22 @@ class XCodeHelper
|
||||
|
||||
public static function getSimulatorID(project:HXProject):String
|
||||
{
|
||||
return getSelectedSimulator(project).id;
|
||||
var simulator = getSelectedSimulator(project);
|
||||
if (simulator == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return simulator.id;
|
||||
}
|
||||
|
||||
public static function getSimulatorName(project:HXProject):String
|
||||
{
|
||||
return getSelectedSimulator(project).name;
|
||||
var simulator = getSelectedSimulator(project);
|
||||
if (simulator == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return simulator.name;
|
||||
}
|
||||
|
||||
private static function getSimulators():String
|
||||
|
||||
Reference in New Issue
Block a user