diff --git a/libfwupdplugin/fu-progress.c b/libfwupdplugin/fu-progress.c index f27b280c1..bc42bdee5 100644 --- a/libfwupdplugin/fu-progress.c +++ b/libfwupdplugin/fu-progress.c @@ -564,6 +564,8 @@ fu_progress_get_step_percentage(FuProgress *self, guint idx) current += step->value; total += step->value; } + if (total == 0) + return 0; return ((gdouble)current * 100.f) / (gdouble)total; }