Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
| inline |
side by side
Fix segfault when pressing PrintScr without a selection
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
e20a1e0
..
d58af7d
100644
(file)
--- a/
st.c
+++ b/
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