diff options
| author | Wilson E. Alvarez | 2017-08-25 11:14:33 -0400 |
|---|---|---|
| committer | Wilson E. Alvarez | 2017-08-26 16:58:47 -0400 |
| commit | 7a07895920196c00d1ee14187e4ccdb2a6f0d0b9 (patch) | |
| tree | d8acd6c8d53717c3a4ec205b000ac8f0ff1fc985 /editor/editor_settings.cpp | |
| parent | 53c0010932f9c1becb63c16243f3a00ede359989 (diff) | |
| download | godot-7a07895.tar.gz godot-7a07895.tar.zst godot-7a07895.zip | |
Added/Fixed null pointer checks
Diffstat (limited to 'editor/editor_settings.cpp')
| -rw-r--r-- | editor/editor_settings.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 5b73d8369..f8c37d586 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -253,8 +253,8 @@ static void _create_script_templates(const String &p_path) { dir->change_dir(p_path); for (int i = 0; i < keys.size(); i++) { if (!dir->file_exists(keys[i])) { - file->reopen(p_path.plus_file((String)keys[i]), FileAccess::WRITE); - ERR_FAIL_COND(!file); + Error err = file->reopen(p_path.plus_file((String)keys[i]), FileAccess::WRITE); + ERR_FAIL_COND(err != OK); file->store_string(templates[keys[i]]); file->close(); } |
