summaryrefslogtreecommitdiff
path: root/gtk/gtkeditable.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkeditable.c')
-rw-r--r--gtk/gtkeditable.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gtk/gtkeditable.c b/gtk/gtkeditable.c
index 31628a408c..4a5ec13f22 100644
--- a/gtk/gtkeditable.c
+++ b/gtk/gtkeditable.c
@@ -577,8 +577,14 @@ gtk_editable_selection_received (GtkWidget *widget,
void
gtk_editable_delete_selection (GtkEditable *editable)
{
- guint start = editable->selection_start_pos;
- guint end = editable->selection_end_pos;
+ guint start;
+ guint end;
+
+ if (!editable->editable)
+ return;
+
+ start = editable->selection_start_pos;
+ end = editable->selection_end_pos;
editable->selection_start_pos = 0;
editable->selection_end_pos = 0;
@@ -655,8 +661,9 @@ gtk_editable_copy_clipboard (GtkEditable *editable, guint32 time)
void
gtk_editable_paste_clipboard (GtkEditable *editable, guint32 time)
{
- gtk_selection_convert (GTK_WIDGET(editable),
- clipboard_atom, ctext_atom, time);
+ if (editable->editable)
+ gtk_selection_convert (GTK_WIDGET(editable),
+ clipboard_atom, ctext_atom, time);
}
void