Fix failing assert when splitting new asset browser in 2

This is an issue in master already, but for many layouts it just isn't
triggered. Pretty sure the assert just shouldn't be executed in extreme
cases, where there is no width for the layout and max-sizes become < 0.
This commit is contained in:
Julian Eisel 2022-02-09 19:35:07 +01:00
parent 5fcf6822dd
commit ff213c802c
1 changed files with 2 additions and 2 deletions

View File

@ -1628,9 +1628,9 @@ float UI_text_clip_middle_ex(const uiFontStyle *fstyle,
}
strwidth = BLF_width(fstyle->uifont_id, str, max_len);
}
BLI_assert(strwidth <= okwidth);
BLI_assert(strwidth <= okwidth);
}
return strwidth;
}