Fix T80613: Assert in UI_but_number_precision_set

-1 is a valid value to pass as RNA float precision. We let the UI code
figure out an appropriate precision then. So don't fail the assert if
-1 is passed.
This commit is contained in:
2020-09-09 12:06:11 +02:00
parent d51c8f78ff
commit dbec51109b

View File

@@ -6762,7 +6762,8 @@ void UI_but_number_precision_set(uiBut *but, float precision)
BLI_assert(but->type == UI_BTYPE_NUM);
but_number->precision = precision;
BLI_assert(precision > -1);
/* -1 is a valid value, UI code figures out an appropriate precision then. */
BLI_assert(precision > -2);
}
/**