From 19429a5e7de3fb70b50c56b060b97a6ff4cc5e30 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 19 Nov 2024 00:57:24 +0100 Subject: mod_smacks: Fix previous commit for case of no session found --- plugins/mod_smacks.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua index 62cf9dd1..2b131031 100644 --- a/plugins/mod_smacks.lua +++ b/plugins/mod_smacks.lua @@ -587,7 +587,7 @@ function do_resume(session, stanza) local id = stanza.attr.previd; local original_session = session_registry[registry_key(session, id)]; - if original_session.destroyed then + if original_session and original_session.destroyed then original_session.log("error", "Tried to resume a destroyed session. This should not happen! %s", debug.traceback()); session_registry[registry_key(session, id)] = nil; original_session = nil; -- cgit v1.2.3