diff --git a/binaries/data/mods/public/simulation/components/TechnologyManager.js b/binaries/data/mods/public/simulation/components/TechnologyManager.js index 1702b4ce7c..b1be6ddfad 100644 --- a/binaries/data/mods/public/simulation/components/TechnologyManager.js +++ b/binaries/data/mods/public/simulation/components/TechnologyManager.js @@ -90,6 +90,9 @@ TechnologyManager.prototype.Technology.prototype.Finish = function() this.finished = true; const template = TechnologyTemplates.Get(this.templateName); + if (!template) + error("Trying to finish non-existing technology: " + this.templateName + ".") + if (template.soundComplete) Engine.QueryInterface(SYSTEM_ENTITY, IID_SoundManager)?.PlaySoundGroup(template.soundComplete, this.researcher);