mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-17 15:21:39 -05:00
Fix potential crash in video condition
This commit is contained in:
parent
d1e912cb24
commit
b2585ae176
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user