obsproject / obs-websocket

Remote-control of OBS Studio through WebSocket
GNU General Public License v2.0
3.8k stars 701 forks source link

base: Fix error to save configuration at obs_module_unload #1160

Closed norihiro closed 11 months ago

norihiro commented 11 months ago

Description

This PR removes _config->Save() from obs_module_unload.

Motivation and Context

Less number of error logs is better.

When obs_module_unload is called, the frontend API is no longer available so that _config->Save() is failing with error messages. Since the configuration is saved from the OK or the Apply button on the dialog, it is not necessary to save it again at obs_module_unload.

How Has This Been Tested?

Tested OS(s): Fedora 37

Run obs and exit it. Checked the log message shows no line below.

Tried to call obs_frontend_get_global_config with no callbacks!
[obs-websocket] [Config::Save] Unable to fetch OBS config!

Types of changes

Checklist: