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-patched-672e4e4b03d8987103020d399b2c05c95a9ea2f8.tar.bz2 st-patched-672e4e4b03d8987103020d399b2c05c95a9ea2f8.tar.xz st-patched-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) | |||
2263 | { | 2263 | { |
2264 | char *ptr; | 2264 | char *ptr; |
2265 | 2265 | ||
2266 | ptr = getsel(); | 2266 | if((ptr = getsel())) { |
2267 | tprinter(ptr, strlen(ptr)); | 2267 | tprinter(ptr, strlen(ptr)); |
2268 | free(ptr); | 2268 | free(ptr); |
2269 | } | ||
2269 | } | 2270 | } |
2270 | 2271 | ||
2271 | void | 2272 | void |