From a134d7014d933b5b804725e6f7df5daf2820a369 Mon Sep 17 00:00:00 2001 From: YellowAfterlife Date: Sat, 17 Oct 2020 14:40:41 +0300 Subject: [PATCH] Have GMVitalizer not die if a view file is missing --- src/VitProject.hx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/VitProject.hx b/src/VitProject.hx index 468cd8d..a4466fb 100644 --- a/src/VitProject.hx +++ b/src/VitProject.hx @@ -107,9 +107,11 @@ class VitProject { }; // for (pair in project.resources) { - var id = pair.Key; + var id = pair.Key, full:String; if (pair.Value.resourceType == GMFolder) { - var fd:YyView = Json.parse(File.getContent(Path.join([dir, "views", '$id.yy']))); + full = Path.join([dir, "views", '$id.yy']); + if (!FileSystem.exists(full)) continue; + var fd:YyView = Json.parse(File.getContent(full)); folders[id] = fd; if (fd.isDefaultView) rootView = fd; } else {