diff --git a/apps/opencs/model/world/scriptcontext.cpp b/apps/opencs/model/world/scriptcontext.cpp index 9da49defe..07031d39c 100644 --- a/apps/opencs/model/world/scriptcontext.cpp +++ b/apps/opencs/model/world/scriptcontext.cpp @@ -47,7 +47,7 @@ std::pair CSMWorld::ScriptContext::getMemberType (const std::string& int index = mData.getScripts().searchId (id2); bool reference = false; - if (index!=-1) + if (index==-1) { // ID is not a script ID. Search for a matching referenceable instead. index = mData.getReferenceables().searchId (id2);