Explorar el Código

win-capture: Clear window capture if window no longer exists

jp9000 hace 9 años
padre
commit
5a5b8b20e3
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      plugins/win-capture/window-capture.c

+ 4 - 1
plugins/win-capture/window-capture.c

@@ -150,8 +150,11 @@ static void wc_tick(void *data, float seconds)
 
 		wc->window = find_window(EXCLUDE_MINIMIZED, wc->priority,
 				wc->class, wc->title, wc->executable);
-		if (!wc->window)
+		if (!wc->window) {
+			if (wc->capture.valid)
+				dc_capture_free(&wc->capture);
 			return;
+		}
 
 		reset_capture = true;