提交 169764fc 编写于 作者: R Richard Stanway

UI: Don't try to load replay buffer hotkey if null

If replay buffer hotkey isn't set, this would cause an error to be
logged due to a null string.
上级 7dc40d5e
......@@ -367,9 +367,14 @@ SimpleOutput::SimpleOutput(OBSBasic *main_) : BasicOutputHandler(main_)
bool useReplayBuffer = config_get_bool(main->Config(),
"SimpleOutput", "RecRB");
if (useReplayBuffer) {
obs_data_t *hotkey;
const char *str = config_get_string(
main->Config(), "Hotkeys", "ReplayBuffer");
obs_data_t *hotkey = obs_data_create_from_json(str);
if (str)
hotkey = obs_data_create_from_json(str);
else
hotkey = nullptr;
replayBuffer = obs_output_create("replay_buffer",
Str("ReplayBuffer"),
nullptr, hotkey);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册