diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-04-01 01:52:46 +0000 |
|---|---|---|
| committer | John Smith <removethis.john.q.public@bigmail.com> | 2012-04-01 01:52:46 +0000 |
| commit | e76b6481c69c9a84decea8bcf345a26a4a408462 (patch) | |
| tree | f68bbc50a72d26f0e4daad8cb10148be16f50279 /src/ege-select-one-action.cpp | |
| parent | apply essentials of patch by zcgucas (diff) | |
| download | inkscape-e76b6481c69c9a84decea8bcf345a26a4a408462.tar.gz inkscape-e76b6481c69c9a84decea8bcf345a26a4a408462.zip | |
Fix for 950677 : Add stops and repeat controls to the gradient toolbar
(bzr r11134)
Diffstat (limited to 'src/ege-select-one-action.cpp')
| -rw-r--r-- | src/ege-select-one-action.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ege-select-one-action.cpp b/src/ege-select-one-action.cpp index f2c97cdc4..42f2fafce 100644 --- a/src/ege-select-one-action.cpp +++ b/src/ege-select-one-action.cpp @@ -826,6 +826,7 @@ GtkWidget* create_tool_item( GtkAction* action ) g_signal_connect( G_OBJECT(normal), "changed", G_CALLBACK(combo_changed_cb), action ); g_object_set_data( G_OBJECT(holder), "ege-combo-box", normal ); + g_object_set_data( G_OBJECT(act), "ege-combo-box", normal ); if (act->private_data->appearanceMode == APPEARANCE_COMPACT) { gchar* sss = 0; @@ -1002,7 +1003,7 @@ void resync_sensitive( EgeSelectOneAction* act ) void combo_changed_cb( GtkComboBox* widget, gpointer user_data ) { EgeSelectOneAction *act = EGE_SELECT_ONE_ACTION(user_data); - gchar *text; + gchar *text = 0; GtkComboBox *cb = GTK_COMBO_BOX (widget); gint newActive = gtk_combo_box_get_active(widget); @@ -1029,6 +1030,11 @@ void combo_changed_cb( GtkComboBox* widget, gpointer user_data ) text = gtk_combo_box_get_active_text (cb); #endif + if (!text) { + /* User probably deleted the data in the model */ + return; + } + if (newActive == -1) { /* indicates the user is entering text for a custom aka "open" value */ if (act->private_data->pendingText && text && (strcmp(act->private_data->pendingText, text) == 0) ) { |
