bug-gnu-electric
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch: bug in X11 text paste


From: Tuukka Toivonen
Subject: patch: bug in X11 text paste
Date: Fri, 20 Jul 2001 14:43:18 +0300 (EEST)

BUG: When editing a text facet and selecting Edit/Paste, electric
     may crash with segmentation violation. Apparently when there
     is no copied text?
SYM: restart X server. Start electric. Create a VHDL facet view. Select
     Edit/Paste.
Program received signal SIGSEGV, Segmentation fault.
0x80b908f in getcutbuffer () at src/graph/graphunixx11.c:3725
(gdb) bt
#0  0x80b908f in getcutbuffer () at src/graph/graphunixx11.c:3725

3723         string = XFetchBuffer(gra_topmsgdpy, &returned, 0);
3724         (void)initinfstr();
3725         if (*string != 0) (void)addstringtoinfstr(string);
where string = NULL

FIX: patch available

--- electric-6.04/src/graph/graphunixx11.c      Thu Jul 19 19:22:45 2001
+++ electric-6.04-tt/src/graph/graphunixx11.c   Fri Jul 20 14:38:22 2001
@@ -3722,8 +3722,11 @@
        /* get cut buffer */
        string = XFetchBuffer(gra_topmsgdpy, &returned, 0);
        (void)initinfstr();
-       if (*string != 0) (void)addstringtoinfstr(string);
-       XFree(string);
+       if (string != NULL)
+       {
+               if (*string != 0) (void)addstringtoinfstr(string);
+               XFree(string);
+       }
        return(returninfstr());
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]