aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-30 14:55:39 +0200
committerKim Alvefur <zash@zash.se>2018-09-30 14:55:39 +0200
commitb1871e8b07d8d90f6397d17e11eb8b3d7cb778e4 (patch)
treebb2708a3cd5c7756426f97e90bdc444d32c1e370
parent1fd061af59f7c5f0e1f07b7b6a4b717d08c6dd16 (diff)
downloadprosody-b1871e8b07d8d90f6397d17e11eb8b3d7cb778e4.tar.gz
prosody-b1871e8b07d8d90f6397d17e11eb8b3d7cb778e4.zip
mod_admin_telnet: Guard against missing table field
-rw-r--r--plugins/mod_admin_telnet.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index 85fb0d6c..828e85f4 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -1328,7 +1328,7 @@ function stats_methods:cfgraph()
table.insert(stat_info.output, s);
end
- if data and data.sample_count > 0 then
+ if data and data.sample_count and data.sample_count > 0 then
local raw_histogram = require "util.statistics".get_histogram(data);
local graph_width, graph_height = 50, 10;