diff --git a/apps/openmw/mwscript/miscextensions.cpp b/apps/openmw/mwscript/miscextensions.cpp index 17824fe491..76b99d04ab 100644 --- a/apps/openmw/mwscript/miscextensions.cpp +++ b/apps/openmw/mwscript/miscextensions.cpp @@ -876,8 +876,8 @@ namespace MWScript else { std::vector contentFiles = MWBase::Environment::get().getWorld()->getContentFiles(); - assert (contentFiles.size() > ptr.getCellRef().getRefNum().mContentFile); - msg << contentFiles[ptr.getCellRef().getRefNum().mContentFile] << std::endl; + + msg << contentFiles.at (ptr.getCellRef().getRefNum().mContentFile) << std::endl; } msg << "RefID: " << ptr.getCellRef().getRefId() << std::endl;