When log entries are created by plugins, they contain arguments created using the plugin's copy of the inline template classes. When the plugin is then unloaded, the argument stored in LogBuffer still keeps pointing to the plugin's virtual methods.
This leads to a crash when trying to delete the argument.
Now the log entries are flushed and cleared always right before unloading plugins from memory.
Fixed: Crash when clearing LogBuffer
When log entries are created by plugins, they contain arguments
created using the plugin's copy of the inline template classes.
When the plugin is then unloaded, the argument stored in LogBuffer
still keeps pointing to the plugin's virtual methods.
This leads to a crash when trying to delete the argument.
Now the log entries are flushed and cleared always right before
unloading plugins from memory.