mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-02-01 01:52:04 -05:00
UI: Fix YouTubeAppDock crash
Apparently the YouTube app dock thing didn't take into consideration the fact that the user may have the browser source available, but may not have browser docks available (via the `cef` global). This is because certain system configurations do not support browser widgets, such as Wayland on Linux. (Lain note: There's multiple things I'm unhappy about here. I'm mostly going to blame myself for multiple reasons.)
This commit is contained in:
@@ -4245,18 +4245,9 @@ void OBSBasicSettings::on_listWidget_itemSelectionChanged()
|
||||
pageIndex = row;
|
||||
}
|
||||
|
||||
void OBSBasicSettings::on_buttonBox_clicked(QAbstractButton *button)
|
||||
void OBSBasicSettings::UpdateYouTubeAppDockSettings()
|
||||
{
|
||||
QDialogButtonBox::ButtonRole val = ui->buttonBox->buttonRole(button);
|
||||
|
||||
if (val == QDialogButtonBox::ApplyRole ||
|
||||
val == QDialogButtonBox::AcceptRole) {
|
||||
if (!QueryAllowedToClose())
|
||||
return;
|
||||
|
||||
SaveSettings();
|
||||
|
||||
#ifdef YOUTUBE_ENABLED
|
||||
if (cef) {
|
||||
std::string service = ui->service->currentText().toStdString();
|
||||
if (IsYouTubeService(service)) {
|
||||
if (!main->GetYouTubeAppDock()) {
|
||||
@@ -4270,6 +4261,22 @@ void OBSBasicSettings::on_buttonBox_clicked(QAbstractButton *button)
|
||||
}
|
||||
main->DeleteYouTubeAppDock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OBSBasicSettings::on_buttonBox_clicked(QAbstractButton *button)
|
||||
{
|
||||
QDialogButtonBox::ButtonRole val = ui->buttonBox->buttonRole(button);
|
||||
|
||||
if (val == QDialogButtonBox::ApplyRole ||
|
||||
val == QDialogButtonBox::AcceptRole) {
|
||||
if (!QueryAllowedToClose())
|
||||
return;
|
||||
|
||||
SaveSettings();
|
||||
|
||||
#ifdef YOUTUBE_ENABLED
|
||||
UpdateYouTubeAppDockSettings();
|
||||
#endif
|
||||
ClearChanged();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user