diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js index a6fdfbb3b95..e85ab298a06 100644 --- a/ui/scripts/instanceWizard.js +++ b/ui/scripts/instanceWizard.js @@ -960,14 +960,16 @@ } }); - $.ajax({ - url: createURL("listTemplateOvfProperties&id=" + selectedTemplateObj.id), - dataType: "json", - async: false, - success: function(json) { - ovfProps = json.listtemplateovfpropertiesresponse.ovfproperty; - } - }); + if (selectedTemplateObj) { + $.ajax({ + url: createURL("listTemplateOvfProperties&id=" + selectedTemplateObj.id), + dataType: "json", + async: false, + success: function(json) { + ovfProps = json.listtemplateovfpropertiesresponse.ovfproperty; + } + }); + } var $step = $('.step.sshkeyPairs:visible'); if (ovfProps == null || ovfProps.length === 0) {