mirror of https://github.com/GNOME/gimp.git
app: don't crash when adjusting quality during an export to jpeg
with preview enabled
This commit is contained in:
parent
2ea44ee14b
commit
8940b25c6d
|
@ -69,6 +69,7 @@ static void gimp_canvas_layer_boundary_get_property (GObject
|
|||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_canvas_layer_boundary_finalize (GObject *object);
|
||||
static void gimp_canvas_layer_boundary_draw (GimpCanvasItem *item,
|
||||
cairo_t *cr);
|
||||
static cairo_region_t * gimp_canvas_layer_boundary_get_extents (GimpCanvasItem *item);
|
||||
|
@ -90,6 +91,7 @@ gimp_canvas_layer_boundary_class_init (GimpCanvasLayerBoundaryClass *klass)
|
|||
|
||||
object_class->set_property = gimp_canvas_layer_boundary_set_property;
|
||||
object_class->get_property = gimp_canvas_layer_boundary_get_property;
|
||||
object_class->finalize = gimp_canvas_layer_boundary_finalize;
|
||||
|
||||
item_class->draw = gimp_canvas_layer_boundary_draw;
|
||||
item_class->get_extents = gimp_canvas_layer_boundary_get_extents;
|
||||
|
@ -113,6 +115,17 @@ gimp_canvas_layer_boundary_init (GimpCanvasLayerBoundary *layer_boundary)
|
|||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_canvas_layer_boundary_finalize (GObject *object)
|
||||
{
|
||||
GimpCanvasLayerBoundaryPrivate *private = GET_PRIVATE (object);
|
||||
|
||||
if (private->layer)
|
||||
g_object_remove_weak_pointer (G_OBJECT (private->layer), (gpointer)&private->layer);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_canvas_layer_boundary_set_property (GObject *object,
|
||||
guint property_id,
|
||||
|
@ -124,7 +137,11 @@ gimp_canvas_layer_boundary_set_property (GObject *object,
|
|||
switch (property_id)
|
||||
{
|
||||
case PROP_LAYER:
|
||||
if (private->layer)
|
||||
g_object_remove_weak_pointer (G_OBJECT (private->layer), (gpointer)&private->layer);
|
||||
private->layer = g_value_get_object (value); /* don't ref */
|
||||
if (private->layer)
|
||||
g_object_add_weak_pointer (G_OBJECT (private->layer), (gpointer)&private->layer);
|
||||
break;
|
||||
case PROP_EDIT_MASK:
|
||||
private->edit_mask = g_value_get_boolean (value);
|
||||
|
|
Loading…
Reference in New Issue