Don't try to open files by empty paths.

This commit is contained in:
John Preston 2021-08-20 20:10:21 +03:00
parent 6b320a99da
commit 5938cb012f

View file

@ -418,6 +418,9 @@ std::array<QImage, 4> PrepareCorners(
ReadResult Read(ReadArgs &&args) {
if (args.content.isEmpty()) {
if (args.path.isEmpty()) {
return {};
}
auto file = QFile(args.path);
if (file.size() > kReadBytesLimit
|| !file.open(QIODevice::ReadOnly)) {