diff options
Diffstat (limited to 'modules/core/os_session.cpp')
-rw-r--r-- | modules/core/os_session.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/core/os_session.cpp b/modules/core/os_session.cpp index e3575f8d1..c53168f06 100644 --- a/modules/core/os_session.cpp +++ b/modules/core/os_session.cpp @@ -143,10 +143,11 @@ class ExceptionDelCallback : public NumberList static void DoDel(CommandSource &source, unsigned index) { - FOREACH_MOD(I_OnExceptionDel, OnExceptionDel(source.u, sessionservice->GetExceptions()[index])); + Exception *e = sessionservice->GetExceptions()[index]; + FOREACH_MOD(I_OnExceptionDel, OnExceptionDel(source.u, e)); - sessionservice->DelException(sessionservice->GetExceptions()[index]); - delete sessionservice->GetExceptions()[index]; + sessionservice->DelException(e); + delete e; } }; |