diff options
author | Rafa Garcia Gallego | 2014-03-26 23:58:27 +0100 |
---|---|---|
committer | Roberto E. Vargas Caballero | 2014-03-27 07:48:32 +0100 |
commit | a1b9dd3ace082e8c90c46cda65abb8198a4c147f (patch) | |
tree | d4524679476e82583c2379c9ee338ee481af3805 | |
parent | 88b9de31ea04fb9aabd8a8fff58d395b57a40349 (diff) | |
download | aur-a1b9dd3ace082e8c90c46cda65abb8198a4c147f.tar.gz |
Fix segfault when pressing PrintScr without a selection
-rw-r--r-- | st.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |