core: check for NULL name in gimp_parasite_list_remove
Sometimes, probably due to a metadata corruption, a pasarite with a NULL name can be present in the parasite list. This causes a crash when trying to remove it, because `gimp_parasite_list_find` does not accept NULL keys. This commit adds a check for NULL names in `gimp_parasite_list_remove`.
This commit is contained in:
parent
8f9b742b51
commit
7b023177a8
1 changed files with 3 additions and 2 deletions
|
|
@ -331,9 +331,10 @@ gimp_parasite_list_remove (GimpParasiteList *list,
|
|||
|
||||
if (list->table)
|
||||
{
|
||||
GimpParasite *parasite;
|
||||
GimpParasite *parasite = NULL;
|
||||
|
||||
parasite = (GimpParasite *) gimp_parasite_list_find (list, name);
|
||||
if (name != NULL)
|
||||
parasite = (GimpParasite *) gimp_parasite_list_find (list, name);
|
||||
|
||||
if (parasite)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue