瀏覽代碼

linux-capture: Fix texture lingering after window closes

After source window closes, texture is still visible in preview until
the source window opens again.
Charles Ray Shisler III 10 年之前
父節點
當前提交
2bdc1e9d7c
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      plugins/linux-capture/xcompcap-main.cpp

+ 4 - 0
plugins/linux-capture/xcompcap-main.cpp

@@ -520,6 +520,10 @@ void XCompcapMain::tick(float seconds)
 void XCompcapMain::render(gs_effect_t *effect)
 {
 	PLock lock(&p->lock, true);
+
+	if (!p->win)
+		return;
+
 	effect = obs_get_base_effect(OBS_EFFECT_OPAQUE);
 
 	if (!lock.isLocked() || !p->tex)