diff options
| author | bulia byak <buliabyak@gmail.com> | 2009-08-22 02:21:36 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2009-08-22 02:21:36 +0000 |
| commit | 9806e07e0d9c6229cd023a3871c29f0d5af5c978 (patch) | |
| tree | 895a2cf7bbb332113f5b255f5f620e743baa701a /src/widgets/gradient-vector.cpp | |
| parent | fix 166186 (diff) | |
| download | inkscape-9806e07e0d9c6229cd023a3871c29f0d5af5c978.tar.gz inkscape-9806e07e0d9c6229cd023a3871c29f0d5af5c978.zip | |
fix 416940
(bzr r8517)
Diffstat (limited to 'src/widgets/gradient-vector.cpp')
| -rw-r--r-- | src/widgets/gradient-vector.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index ba31470f6..c884604a2 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -1084,10 +1084,18 @@ sp_gradient_vector_widget_destroy (GtkObject *object, gpointer /*data*/) gradient = (GObject*)g_object_get_data (G_OBJECT (object), "gradient"); - if (gradient && SP_OBJECT_REPR(gradient)) { - /* Remove signals connected to us */ - /* fixme: may use _connect_while_alive as well */ + sigc::connection *release_connection = (sigc::connection *)g_object_get_data(G_OBJECT(object), "gradient_release_connection"); + sigc::connection *modified_connection = (sigc::connection *)g_object_get_data(G_OBJECT(object), "gradient_modified_connection"); + + if (gradient) { + g_assert( release_connection != NULL ); + g_assert( modified_connection != NULL ); + release_connection->disconnect(); + modified_connection->disconnect(); sp_signal_disconnect_by_data (gradient, object); + } + + if (gradient && SP_OBJECT_REPR(gradient)) { sp_repr_remove_listener_by_data (SP_OBJECT_REPR(gradient), object); } } |
