don't try to send keys if backend is not available

This commit is contained in:
unxed
2022-11-10 22:33:33 +04:00
committed by GitHub
parent 2a9a16fd73
commit d08e4009c6
+7 -5
View File
@@ -5765,13 +5765,15 @@ if( (GetKeyState(VK_MENU)&0x8000) && (wParam==VK_SPACE) ) {
// send escape seq
char* str = "\x1b_f2l";
backend_send(backend, str, strlen(str));
if (backend) {
char* str = "\x1b_f2l";
backend_send(backend, str, strlen(str));
backend_send(backend, out, count);
backend_send(backend, out, count);
char* str2 = "\x07";
backend_send(backend, str2, strlen(str2));
char* str2 = "\x07";
backend_send(backend, str2, strlen(str2));
}
// don't forget to free memory :)
free(out);