Skip to content

Commit 7ec57a3

Browse files
committed
Stop crashing with an empty schema
1 parent 1c9f069 commit 7ec57a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

parts/exd/schema.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Schema::Schema(const QString &path)
1515
QFile file(path);
1616
file.open(QIODevice::ReadOnly);
1717
auto bytes = file.readAll();
18+
if (bytes.isEmpty()) {
19+
return;
20+
}
1821

1922
const auto tree = ryml::parse_in_place(bytes.data());
2023
if (tree.has_child(tree.root_id(), "fields")) {

0 commit comments

Comments
 (0)