Index: gtk.c
===================================================================
--- gtk.c	(revision 1531)
+++ gtk.c	(working copy)
@@ -2122,9 +2122,14 @@
 static void
 get_proc(GtkClipboard *clipboard, const gchar *buffer, gpointer data)
 {
-    gchar *end_buffer = (gchar *) (buffer + strlen(buffer));
-    gchar *dstp, *srcp, text[MAXLINE];
+    gchar *dstp, *end_buffer, *srcp, text[MAXLINE];
 
+    if (buffer == NULL) {
+        return;
+    }
+
+    end_buffer = (gchar *) (buffer + strlen(buffer));
+
     /* If the clipboard buffer contains any occurances of the "thousands
      * separator", remove them.
      */
