diff --git a/apps/openmw/mwlua/animationbindings.cpp b/apps/openmw/mwlua/animationbindings.cpp index 07e2c4f133..cce00d49d3 100644 --- a/apps/openmw/mwlua/animationbindings.cpp +++ b/apps/openmw/mwlua/animationbindings.cpp @@ -303,8 +303,9 @@ namespace MWLua api["remove"] = [context](std::string vfxId) { context.mLuaManager->addAction( [vfxId = vfxId] { - if (!vfxId.empty()) - MWBase::Environment::get().getWorld()->removeEffect(vfxId); + if (vfxId.empty()) + throw std::runtime_error("vfxId is empty"); + MWBase::Environment::get().getWorld()->removeEffect(vfxId); }, "openmw.vfx.remove"); };