You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
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 <ferdnyc@users.noreply.github.com>
This commit is contained in:
@@ -160,6 +160,9 @@ void ZmqLogger::Path(string new_path)
|
||||
|
||||
void ZmqLogger::Close()
|
||||
{
|
||||
// Disable logger as it no longer needed
|
||||
enabled = false;
|
||||
|
||||
// Close file (if already open)
|
||||
if (log_file.is_open())
|
||||
log_file.close();
|
||||
|
||||
Reference in New Issue
Block a user