diff options
| author | Denis Declara <declara91@gmail.com> | 2012-04-01 15:49:05 +0000 |
|---|---|---|
| committer | Denis Declara <declara91@gmail.com> | 2012-04-01 15:49:05 +0000 |
| commit | ab4f61b539c21e5aa8aa6cca9bd5950b84bc33ee (patch) | |
| tree | 7fb9d8555d36fbdd8e7f1dec13ff46c1f5e160f8 /src/ege-select-one-action.cpp | |
| parent | Brought old code, "Rows and Columns" in it's own class. Added a separate clas... (diff) | |
| parent | fix XML output of guideline color (diff) | |
| download | inkscape-ab4f61b539c21e5aa8aa6cca9bd5950b84bc33ee.tar.gz inkscape-ab4f61b539c21e5aa8aa6cca9bd5950b84bc33ee.zip | |
Trunk merge
(bzr r11073.1.9)
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) ) { |
