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.
This commit is contained in:
parent
7dc40d5edf
commit
169764fc51
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user