mod_admin_shell: Ensure connection exists to get port from (fixes #1777) 0.12
authorKim Alvefur <zash@zash.se>
Sun, 23 Oct 2022 16:19:39 +0200
branch0.12
changeset 12791 3735ad8d6f8e
parent 12783 f0474d40364c
child 12792 3835c397b129
mod_admin_shell: Ensure connection exists to get port from (fixes #1777)
plugins/mod_admin_shell.lua
--- a/plugins/mod_admin_shell.lua	Thu Oct 20 16:31:18 2022 +0200
+++ b/plugins/mod_admin_shell.lua	Sun Oct 23 16:19:39 2022 +0200
@@ -745,7 +745,11 @@
 		width = 5;
 		align = "right";
 		key = "conn";
-		mapper = function(conn) return conn:serverport(); end;
+		mapper = function(conn)
+			if conn then
+				return conn:serverport();
+			end
+		end;
 	};
 	dir = {
 		title = "Dir";