Sfoglia il codice sorgente

UI: Check for null pointer

This was actually the line of code that the mixer dock widget crash was
triggered by.  This technically shouldn't ever be null, but better to be
safe than sorry.
jp9000 6 anni fa
parent
commit
6464d5f853
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      UI/window-dock-browser.cpp

+ 1 - 1
UI/window-dock-browser.cpp

@@ -14,7 +14,7 @@ void BrowserDock::closeEvent(QCloseEvent *event)
 		panel_version = obs_browser_qcef_version();
 		panel_version = obs_browser_qcef_version();
 	}
 	}
 
 
-	if (panel_version >= 2) {
+	if (panel_version >= 2 && !!cefWidget) {
 		cefWidget->closeBrowser();
 		cefWidget->closeBrowser();
 	}
 	}
 }
 }