Skip to content
Commit 69e6b090 authored by Jehan's avatar Jehan Committed by Øyvind "pippin" Kolås
Browse files

babl: re-creation of palette conversions must always set data.

If we allow conversions to be recreated for palettes, it will create a
new identical conversion with collision number incremented in the name
and no user data. Yet the user data is extremely important for palette
conversions, because it contains the palette itself which is required by
the palette conversion functions. Hence we end up crashing.

Moreover, although I think that right now, only palette conversions use
the data field, it might be used for other type of data in the future.
In any case, we should always save this data along as it has been stored
there for a reason.

Finally in babl-palette code, make sure the user data is added to the
models before creating the formats and conversions as we also ended up
in crash-happy code when we didn't.

See: https://gitlab.gnome.org/GNOME/gimp/-/issues/6501
parent 4c7c2b75
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment