mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-20 05:27:26 +00:00
Add some robustness against broken data
This was SVN commit r7505.
This commit is contained in:
@@ -134,6 +134,8 @@ function setupUnitPanel(guiName, usedPanels, unitEntState, items, callback)
|
||||
var icon = getGUIObjectByName("unit"+guiName+"Icon["+i+"]");
|
||||
|
||||
var template = Engine.GuiInterfaceCall("GetTemplateData", entType);
|
||||
if (!template)
|
||||
continue; // ignore attempts to use invalid templates (an error should have been reported already)
|
||||
|
||||
var name;
|
||||
if (template.name.specific && template.name.generic)
|
||||
|
||||
Reference in New Issue
Block a user