diff options
Diffstat (limited to 'extension/src')
-rw-r--r-- | extension/src/LoadGameOpenVic.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/extension/src/LoadGameOpenVic.cpp b/extension/src/LoadGameOpenVic.cpp index ce1bf39..27fb265 100644 --- a/extension/src/LoadGameOpenVic.cpp +++ b/extension/src/LoadGameOpenVic.cpp @@ -19,14 +19,15 @@ static Error _load_json_file(String const& file_description, String const& file_ return err == OK ? FAILED : err; } const String json_string = file->get_as_text(); - JSON json; - err = json.parse(json_string); + Ref<JSON> json; + json.instantiate(); + err = json->parse(json_string); if (err != OK) { UtilityFunctions::push_error("Failed to parse ", file_description, " file as JSON: ", file_path, - "\nError at line ", json.get_error_line(), ": ", json.get_error_message()); + "\nError at line ", json->get_error_line(), ": ", json->get_error_message()); return err; } - result = json.get_data(); + result = json->get_data(); return err; } |