# HG changeset patch # User Michiel Broek # Date 1651518588 -7200 # Node ID ff09c95d9e449e08c0f80ab1d8e5f6710e436e9f # Parent 91af2c69734537673379472aeb28a212eaa3b3e8 Fix fermentable percent check if there are no fermentables. diff -r 91af2c697345 -r ff09c95d9e44 src/EditProduct.cpp --- a/src/EditProduct.cpp Mon May 02 16:40:41 2022 +0200 +++ b/src/EditProduct.cpp Mon May 02 21:09:48 2022 +0200 @@ -401,7 +401,7 @@ product->fermentables.append(f); } qDebug() << "fermentables" << product->fermentables.size() << percentcheck; - if (percentcheck == 0) { + if (percentcheck == 0 && product->fermentables.size()) { /* Missing percentages, fix it. */ double total = 0; for (int i = 0; i < product->fermentables.size(); i++) {