UI: Don't read unloaded module in source toolbar
Avoid potential crashes similar to #4391 for existing users, especially on non-Windows.master
parent
b2360b4332
commit
4e04011101
|
@ -323,6 +323,9 @@ DeviceCaptureToolbar::DeviceCaptureToolbar(QWidget *parent, OBSSource source)
|
|||
active = obs_data_get_bool(settings, "active");
|
||||
|
||||
obs_module_t *mod = obs_get_module("win-dshow");
|
||||
if (!mod)
|
||||
return;
|
||||
|
||||
activateText = obs_module_get_locale_text(mod, "Activate");
|
||||
deactivateText = obs_module_get_locale_text(mod, "Deactivate");
|
||||
|
||||
|
@ -373,6 +376,9 @@ GameCaptureToolbar::GameCaptureToolbar(QWidget *parent, OBSSource source)
|
|||
ui->setupUi(this);
|
||||
|
||||
obs_module_t *mod = obs_get_module("win-capture");
|
||||
if (!mod)
|
||||
return;
|
||||
|
||||
ui->modeLabel->setText(obs_module_get_locale_text(mod, "Mode"));
|
||||
ui->windowLabel->setText(
|
||||
obs_module_get_locale_text(mod, "WindowCapture.Window"));
|
||||
|
|
Loading…
Reference in New Issue