mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-23 08:37:15 -05:00
Fix potential crash in video condition
This commit is contained in:
@@ -200,6 +200,8 @@ bool MacroConditionVideo::LoadImageFromFile()
|
||||
if (!_matchImage.load(QString::fromStdString(_file))) {
|
||||
blog(LOG_WARNING, "Cannot load image data from file '%s'",
|
||||
_file.c_str());
|
||||
(&_matchImage)->~QImage();
|
||||
new (&_matchImage) QImage();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
PatternMatchData createPatternData(QImage &pattern)
|
||||
{
|
||||
PatternMatchData data;
|
||||
PatternMatchData data{};
|
||||
if (pattern.isNull()) {
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user