# HG changeset patch # User Kim Alvefur # Date 1666534779 -7200 # Node ID 3735ad8d6f8e111e0c9e47cc284d0508f30a6459 # Parent f0474d40364ce5762edaefbece38eb64d9a04cf3 mod_admin_shell: Ensure connection exists to get port from (fixes #1777) diff -r f0474d40364c -r 3735ad8d6f8e 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";