diff options
Diffstat (limited to 'core/io/resource_import.cpp')
-rw-r--r-- | core/io/resource_import.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/io/resource_import.cpp b/core/io/resource_import.cpp index 556dff3125..892c2988dc 100644 --- a/core/io/resource_import.cpp +++ b/core/io/resource_import.cpp @@ -81,8 +81,10 @@ RES ResourceFormatImporter::load(const String &p_path,const String& p_original_p RES res = ResourceLoader::load(pat.path,pat.type,false,r_error); #ifdef TOOLS_ENABLED - res->set_import_last_modified_time( res->get_last_modified_time() ); //pass this, if used - res->set_import_path(pat.path); + if (res.is_valid()) { + res->set_import_last_modified_time( res->get_last_modified_time() ); //pass this, if used + res->set_import_path(pat.path); + } #endif return res; |