Fix segfault when pressing PrintScr without a selection

This commit is contained in:
Rafa Garcia Gallego 2014-03-26 23:58:27 +01:00 committed by Roberto E. Vargas Caballero
parent 45b808b88e
commit 672e4e4b03

3
st.c
View file

@ -2263,10 +2263,11 @@ tdumpsel(void)
{ {
char *ptr; char *ptr;
ptr = getsel(); if((ptr = getsel())) {
tprinter(ptr, strlen(ptr)); tprinter(ptr, strlen(ptr));
free(ptr); free(ptr);
} }
}
void void
tdumpline(int n) { tdumpline(int n) {