Fix #125669: Add additional check to ui_but_equals_old

A button being wrongly matched during update caused a crash when it was
freed. The additional check prevents this false positive.

Pull Request: https://projects.blender.org/blender/blender/pulls/125821
This commit is contained in:
Leon Schittek
2024-08-05 23:40:00 +02:00
committed by Harley Acheson
parent 6a656b885d
commit e68bdd44af

View File

@@ -764,6 +764,9 @@ static bool ui_but_equals_old(const uiBut *but, const uiBut *oldbut)
if (!ELEM(oldbut->func_arg2, oldbut, but->func_arg2)) {
return false;
}
if (but->block_create_func != oldbut->block_create_func) {
return false;
}
if (!but->funcN && ((but->poin != oldbut->poin && (uiBut *)oldbut->poin != oldbut) ||
(but->pointype != oldbut->pointype)))
{