diff --git a/deps/agg/src/agg_image_filters.cpp b/deps/agg/src/agg_image_filters.cpp index 0f6191de9..bc3aa9719 100644 --- a/deps/agg/src/agg_image_filters.cpp +++ b/deps/agg/src/agg_image_filters.cpp @@ -63,7 +63,7 @@ void image_filter_lut::normalize() if(sum == image_filter_scale) break; - double k = double(image_filter_scale) / double(sum); + double k = (sum > 0) ? double(image_filter_scale) / double(sum) : 1; sum = 0; for(j = 0; j < m_diameter; j++) {