mirror of https://github.com/GNOME/gimp.git
plug-ins: fix #5305 Lighting Effects crashes when I use a channel as Bumpmap
When a channel is selected as bumpmap, the bump_format can be different than it was before. However, we always kept the first bump_format, which could be RGB, in which case trying to use it with a channel caused a crash in GIMP. To fix this we always update the bump_format if bumpmap is enabled.
This commit is contained in:
parent
e8a31ba4f2
commit
7b7d616358
|
@ -383,9 +383,12 @@ image_setup (GimpDrawable *drawable,
|
|||
void
|
||||
bumpmap_setup (GimpDrawable *bumpmap)
|
||||
{
|
||||
if (bumpmap && ! bump_buffer)
|
||||
if (bumpmap)
|
||||
{
|
||||
bump_buffer = gimp_drawable_get_buffer (bumpmap);
|
||||
if (! bump_buffer)
|
||||
{
|
||||
bump_buffer = gimp_drawable_get_buffer (bumpmap);
|
||||
}
|
||||
|
||||
if (gimp_drawable_is_rgb (bumpmap))
|
||||
bump_format = babl_format ("R'G'B' u8");
|
||||
|
|
Loading…
Reference in New Issue