Fix crash with start recording button/hotkey and invalid encoder settings

In case the encoder failed to initialize (making Start call Stop)
StartRecording would try to access invalid objects (since Stop deleted
them)
master
palana 2014-02-12 17:37:59 +01:00
parent 3c77310c9d
commit 3a3eb810dd
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ void OBS::ToggleCapturing()
void OBS::StartRecording()
{
if (bRecording) return;
if (!bRunning || bRecording) return;
int networkMode = AppConfig->GetInt(TEXT("Publish"), TEXT("Mode"), 2);
bWriteToFile = networkMode == 1 || AppConfig->GetInt(TEXT("Publish"), TEXT("SaveToFile")) != 0;