From eb1c89403881e97497b38720d788d2cf5392122f Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 3 May 2022 23:29:20 +0300 Subject: [PATCH] [Client] Add clearer debug for bad LiveCellRef casts --- apps/openmw/mwworld/ptr.hpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/ptr.hpp b/apps/openmw/mwworld/ptr.hpp index 9ab18d7f4..6f269ab3f 100644 --- a/apps/openmw/mwworld/ptr.hpp +++ b/apps/openmw/mwworld/ptr.hpp @@ -52,7 +52,16 @@ namespace MWWorld std::stringstream str; str<< "Bad LiveCellRef cast to "<mRef.getRefId().c_str() << " " << mRef->mRef.getRefNum().mIndex << "-" << mRef->mRef.getMpNum(); + /* + End of tes3mp change (major) + */ + else str<< "an empty object"; throw std::runtime_error(str.str()); @@ -128,7 +137,15 @@ namespace MWWorld std::stringstream str; str<< "Bad LiveCellRef cast to "<mRef.getRefId().c_str() << " " << mRef->mRef.getRefNum().mIndex << "-" << mRef->mRef.getMpNum(); + /* + End of tes3mp change (major) + */ else str<< "an empty object"; throw std::runtime_error(str.str());