[gimp] Bug 794634 - CRITICAL when adding layers with Dissolve mode
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 794634 - CRITICAL when adding layers with Dissolve mode
- Date: Fri, 23 Mar 2018 18:57:28 +0000 (UTC)
commit f49e4b426391daaa528e5c4a18c5911a566aec39
Author: Ell <ell_se yahoo com>
Date: Fri Mar 23 14:39:31 2018 -0400
Bug 794634 - CRITICAL when adding layers with Dissolve mode
Fix a CRITICAL when calling gimp_layer_mode_get_format() with an
AUTO composite space and a NULL preferred format, which is valid:
it means the layer mode is composite-space agnostic (as DISSOLVE
is), and that there's no preferred format.
A NULL preferred format can occur during
gimp_operation_layer_mode_prepare() if the layer's mode node is not
yet attached anything through its "input" or "aux" pads, which is
the case during the call to gimp_layer_update_mode_node() while
constructing the layer's node in gimp_layer_get_node().
app/operations/layer-modes/gimp-layer-modes.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/operations/layer-modes/gimp-layer-modes.c b/app/operations/layer-modes/gimp-layer-modes.c
index 3fb0c77..e26ac6f 100644
--- a/app/operations/layer-modes/gimp-layer-modes.c
+++ b/app/operations/layer-modes/gimp-layer-modes.c
@@ -1416,7 +1416,7 @@ gimp_layer_mode_get_format (GimpLayerMode mode,
/* compositing is color-space agnostic. return a format that has a fast
* conversion path to/from the preferred format.
*/
- if (gimp_babl_format_get_linear (preferred_format))
+ if (! preferred_format || gimp_babl_format_get_linear (preferred_format))
return babl_format ("RGBA float");
else
return babl_format ("R'G'B'A float");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]