diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2011-03-20 06:42:59 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2011-03-20 06:42:59 +0000 |
| commit | 4e01c64b6094fa1f4bf63ec8a8f77cf21696b711 (patch) | |
| tree | 8d6c7ae3f223f537457c55d3976d269772431eb9 /src/ege-select-one-action.cpp | |
| parent | Filters. Fix for Bug #737813 (translucent filter crashes program when resizin... (diff) | |
| download | inkscape-4e01c64b6094fa1f4bf63ec8a8f77cf21696b711.tar.gz inkscape-4e01c64b6094fa1f4bf63ec8a8f77cf21696b711.zip | |
Cleaned up memory patch. Fixes bug #737298.
Fixed bugs:
- https://launchpad.net/bugs/737298
(bzr r10118)
Diffstat (limited to 'src/ege-select-one-action.cpp')
| -rw-r--r-- | src/ege-select-one-action.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/ege-select-one-action.cpp b/src/ege-select-one-action.cpp index 664ffd13d..83a083425 100644 --- a/src/ege-select-one-action.cpp +++ b/src/ege-select-one-action.cpp @@ -663,15 +663,18 @@ GtkWidget* create_tool_item( GtkAction* action ) gint index = 0; GtkTooltips* tooltips = gtk_tooltips_new(); - gchar* sss = 0; - g_object_get( G_OBJECT(action), "short_label", &sss, NULL ); - // If short_label not defined, g_object_get will return label. - // This hack allows a label to be used with a drop-down menu when - // no label is used with a set of icons that are self-explanatory. - if (sss && strcmp( sss, "NotUsed" ) != 0 ) { - GtkWidget* lbl; - lbl = gtk_label_new(sss); - gtk_box_pack_start( GTK_BOX(holder), lbl, FALSE, FALSE, 4 ); + { + gchar* sss = 0; + g_object_get( G_OBJECT(action), "short_label", &sss, NULL ); + // If short_label not defined, g_object_get will return label. + // This hack allows a label to be used with a drop-down menu when + // no label is used with a set of icons that are self-explanatory. + if (sss && strcmp( sss, "NotUsed" ) != 0 ) { + GtkWidget* lbl = gtk_label_new(sss); + gtk_box_pack_start( GTK_BOX(holder), lbl, FALSE, FALSE, 4 ); + } + g_free( sss ); + sss = 0; } valid = gtk_tree_model_get_iter_first( act->private_data->model, &iter ); @@ -813,9 +816,10 @@ GtkWidget* create_tool_item( GtkAction* action ) gchar* sss = 0; g_object_get( G_OBJECT(action), "short_label", &sss, NULL ); if (sss) { - GtkWidget* lbl; - lbl = gtk_label_new(sss); + GtkWidget* lbl = gtk_label_new(sss); gtk_box_pack_start( GTK_BOX(holder), lbl, FALSE, FALSE, 4 ); + g_free( sss ); + sss = 0; } } |
