fix possible divide by zero

This commit is contained in:
c0ntrol
2018-09-15 21:06:10 +02:00
parent a7fa31bada
commit ac4b3042b3

View File

@@ -1086,6 +1086,10 @@ int luminance_mean(uint8_t * frame[], int w, int h)
p += 31;
count += 4;
}
if(count == 0)
return 0;
return sum / count;
}