Hi,

Attached is a silly patch to prevent a segmentation fault in st when
you accidentally press PrintScr with no text selected.

BTW does anybody use this with a plumber? Care to explain the details?

BR,
Rafa
diff --git a/st.c b/st.c
index 69b2491..97abcbb 100644
--- a/st.c
+++ b/st.c
@@ -2315,9 +2315,10 @@ tdumpsel(void)
 {
        char *ptr;
 
-       ptr = getsel();
-       tprinter(ptr, strlen(ptr));
-       free(ptr);
+       if((ptr = getsel())) {
+               tprinter(ptr, strlen(ptr));
+               free(ptr);
+       }
 }
 
 void

Reply via email to