From d89f8a7972c0f51957fc4448ed36c6523c915d58 Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Sat, 26 Feb 2022 19:32:02 +0100 Subject: [PATCH] Clear pixmap if screenshot creation failed --- src/external-macro-modules/opencv/video-match-dialog.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/external-macro-modules/opencv/video-match-dialog.cpp b/src/external-macro-modules/opencv/video-match-dialog.cpp index 7150bf48..8281e30d 100644 --- a/src/external-macro-modules/opencv/video-match-dialog.cpp +++ b/src/external-macro-modules/opencv/video-match-dialog.cpp @@ -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);