diff options
author | Rafa Garcia Gallego <rafael.garcia.gallego@gmail.com> | 2014-03-26 23:58:27 +0100 |
---|---|---|
committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2014-03-27 07:48:32 +0100 |
commit | 672e4e4b03d8987103020d399b2c05c95a9ea2f8 (patch) | |
tree | 3d03062150d1fab72179dfb7941290b951c974c5 | |
parent | 45b808b88ee63f21a188800ba3473a24a3c4b987 (diff) | |
download | st-672e4e4b03d8987103020d399b2c05c95a9ea2f8.tar.gz st-672e4e4b03d8987103020d399b2c05c95a9ea2f8.tar.bz2 st-672e4e4b03d8987103020d399b2c05c95a9ea2f8.zip |
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 |