Commit b5944d8d authored by Simon Morlat's avatar Simon Morlat

fix potential divide by zero in quality indicator

parent e83722c7
......@@ -142,6 +142,7 @@ void ms_quality_indicator_update_local(MSQualityIndicator *qi){
}
float ms_quality_indicator_get_average_rating(MSQualityIndicator *qi){
if (qi->count==0) return -1; /*no rating available*/
return (float)(qi->sum_ratings/(double)qi->count);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment