Explorar el Código

Fix segfault when pressing PrintScr without a selection

Rafa Garcia Gallego hace 11 años
padre
commit
672e4e4b03
Se han modificado 1 ficheros con 4 adiciones y 3 borrados
  1. 4 3
      st.c

+ 4 - 3
st.c

@@ -2263,9 +2263,10 @@ tdumpsel(void)
 {
 	char *ptr;
 
-	ptr = getsel();
-	tprinter(ptr, strlen(ptr));
-	free(ptr);
+	if((ptr = getsel())) {
+		tprinter(ptr, strlen(ptr));
+		free(ptr);
+	}
 }
 
 void