Commit 672e4e4

Rafa Garcia Gallego <rafael.garcia.gallego@gmail.com>
2014-03-26 18:58:27
Fix segfault when pressing PrintScr without a selection
1 parent 45b808b
Changed files (1)
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