Skip to content

Commit dfbcb47

Browse files
SuslikVferdnyc
andauthored
Disable debug logger on close
The logger can be closed from the external thread (openshot-qt), while same logger instance is still in use in libopenshot. This change prevents crash on attempts to use debug logger if it was closed. Co-authored-by: Frank Dana <[email protected]>
1 parent 4bb54b0 commit dfbcb47

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ZmqLogger.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ void ZmqLogger::Path(string new_path)
160160

161161
void ZmqLogger::Close()
162162
{
163+
// Disable logger as it no longer needed
164+
enabled = false;
165+
163166
// Close file (if already open)
164167
if (log_file.is_open())
165168
log_file.close();

0 commit comments

Comments
 (0)