Clear pixmap if screenshot creation failed

This commit is contained in:
WarmUpTill
2022-02-26 19:32:02 +01:00
committed by WarmUpTill
parent f7a2aa09cb
commit d89f8a7972

View File

@@ -60,12 +60,14 @@ void ShowMatchDialog::CheckForMatchLoop()
if (!screenshot.done) {
_statusLabel->setText(obs_module_text(
"AdvSceneSwitcher.condition.video.screenshotFail"));
_imageLabel->setPixmap(QPixmap());
continue;
}
if (screenshot.image.width() == 0 ||
screenshot.image.height() == 0) {
_statusLabel->setText(obs_module_text(
"AdvSceneSwitcher.condition.video.screenshotEmpty"));
_imageLabel->setPixmap(QPixmap());
continue;
}
auto image = MarkMatch(screenshot.image);