소스 검색

Fix segfault when pressing PrintScr without a selection

Rafa Garcia Gallego 11 년 전
부모
커밋
672e4e4b03
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      st.c

+ 4 - 3
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