mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 15:24:07 +00:00
UI: Fix null string being passed to blog()
This commit is contained in:
parent
c4c5b0d21d
commit
2dc87dcd7f
|
@ -561,8 +561,9 @@ void OBSAdvAudioCtrl::monitoringTypeChanged(int index)
|
|||
break;
|
||||
}
|
||||
|
||||
const char *name = obs_source_get_name(source);
|
||||
blog(LOG_INFO, "User changed audio monitoring for source '%s' to: %s",
|
||||
obs_source_get_name(source), type);
|
||||
name ? name : "(null)", type);
|
||||
|
||||
auto undo_redo = [](const std::string &name, obs_monitoring_type val) {
|
||||
obs_source_t *source = obs_get_source_by_name(name.c_str());
|
||||
|
@ -570,7 +571,6 @@ void OBSAdvAudioCtrl::monitoringTypeChanged(int index)
|
|||
obs_source_release(source);
|
||||
};
|
||||
|
||||
const char *name = obs_source_get_name(source);
|
||||
OBSBasic::Get()->undo_s.add_action(
|
||||
QTStr("Undo.MonitoringType.Change").arg(name),
|
||||
std::bind(undo_redo, std::placeholders::_1, prev),
|
||||
|
|
Loading…
Reference in a new issue