diff --git a/app/core/gimplinklayer.c b/app/core/gimplinklayer.c index f4fc7efa53..3791e38d52 100644 --- a/app/core/gimplinklayer.c +++ b/app/core/gimplinklayer.c @@ -841,12 +841,16 @@ gimp_link_layer_get_transform (GimpLinkLayer *layer, { g_return_val_if_fail (GIMP_IS_LINK_LAYER (layer), FALSE); - *matrix = layer->p->matrix; - *offset_x = layer->p->offset_x; - *offset_y = layer->p->offset_y; - *interpolation = layer->p->interpolation; + if (matrix) + *matrix = layer->p->matrix; + if (offset_x) + *offset_x = layer->p->offset_x; + if (offset_y) + *offset_y = layer->p->offset_y; + if (interpolation) + *interpolation = layer->p->interpolation; - return ! gimp_matrix3_is_identity (matrix); + return ! gimp_matrix3_is_identity (&layer->p->matrix); } gboolean diff --git a/app/xcf/xcf-save.c b/app/xcf/xcf-save.c index ded3e954c4..160f8c4e37 100644 --- a/app/xcf/xcf-save.c +++ b/app/xcf/xcf-save.c @@ -745,7 +745,8 @@ xcf_save_layer_props (XcfInfo *info, else if (GIMP_IS_LINK_LAYER (layer)) { xcf_check_error (xcf_save_prop (info, image, PROP_LINK_LAYER, error, layer), ;); - xcf_check_error (xcf_save_prop (info, image, PROP_TRANSFORM, error, layer), ;); + if (gimp_link_layer_get_transform (GIMP_LINK_LAYER (layer), NULL, NULL, NULL, NULL)) + xcf_check_error (xcf_save_prop (info, image, PROP_TRANSFORM, error, layer), ;); } if (gimp_viewable_get_children (GIMP_VIEWABLE (layer)))