Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/recorder/jamcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ void CJamController::SetRecordingDir ( QString newRecordingDir, int iServerFrame
bRecorderInitialised = ( strRecorderErrMsg == QString() );
bEnableRecording = bRecorderInitialised && !bDisableRecording;

if ( !bRecorderInitialised )

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So pJamRecorder = new recorder::CJamRecorder(...) never throws, leaving it to pJamRecorder->Init() to return an error (or empty) string tidily (I vaguely remember it). Thus we only enter here if the was an error.

{
delete pJamRecorder; // Init() failed: never moved to thread / never
pJamRecorder = nullptr; // wired to deleteLater, so free it here (#1083)
}

qInfo() << qUtf8Printable ( QString ( "Recording state: %1" ).arg ( bEnableRecording ? "enabled" : "disabled" ) );
}
else
Expand Down
Loading