UI: Don't warn about bandwidth test mode if not authed

It was possible to enable the bandwidth test and disconnect your Twitch
account, resulting in a confusing prompt about streaming in bandwidth
test mode when trying to start a stream.
This commit is contained in:
Richard Stanway 2020-09-09 00:44:08 +02:00
parent 5a236870c0
commit 063c69ad1e

View file

@ -6275,9 +6275,14 @@ void OBSBasic::on_streamButton_clicked()
bool confirm = config_get_bool(GetGlobalConfig(), "BasicWindow",
"WarnBeforeStartingStream");
obs_data_t *settings = obs_service_get_settings(service);
bool bwtest = obs_data_get_bool(settings, "bwtest");
obs_data_release(settings);
bool bwtest = false;
if (this->auth) {
obs_data_t *settings =
obs_service_get_settings(service);
bwtest = obs_data_get_bool(settings, "bwtest");
obs_data_release(settings);
}
if (bwtest && isVisible()) {
QMessageBox::StandardButton button =