aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafa Garcia Gallego <rafael.garcia.gallego@gmail.com>2014-03-26 23:58:27 +0100
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2014-03-27 07:48:32 +0100
commit672e4e4b03d8987103020d399b2c05c95a9ea2f8 (patch)
tree3d03062150d1fab72179dfb7941290b951c974c5
parent45b808b88ee63f21a188800ba3473a24a3c4b987 (diff)
downloadst-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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/st.c b/st.c
index e20a1e0..d58af7d 100644
--- a/st.c
+++ b/st.c
@@ -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
2271void 2272void