Skip to content

Issue #9742: Fix crash when filling new image with Middle Gray color

Alx Sa requested to merge alxsa-fix-gray-fill-image into master

This patch attempts to resolve #9742 (closed).

The new Middle Gray fill option can be selected for new images and new layers. It works fine for new layers, but it crashed for new images. This is because it tries to retrieve the image from context, and new images are not yet added to the context when the fill command is called.

From the issue comments:

Calling gimp_context_set_image () in gimp_image_new_from_template () before gimp_drawable_fill () appears to fix the problem, but I'm not sure if it's the right solution.

Merge request reports