summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--img/disp_common.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/img/disp_common.lua b/img/disp_common.lua
index cf67d3a..5648d87 100644
--- a/img/disp_common.lua
+++ b/img/disp_common.lua
@@ -20,6 +20,7 @@ end
local function average_color(pxlist)
local count = #pxlist
+ if count == 0 then return {0,0,0} end
local tr,tg,tb = 0,0,0
for _,px in ipairs(pxlist) do
tr = tr + px[1]