Browse Source

Merge pull request #22772 from Zylann/fix_load_memdelete_null

Don't delete FileAccess when it is null
Rémi Verschelde 7 năm trước cách đây
mục cha
commit
08dd035899

+ 0 - 1
core/io/image_loader.cpp

@@ -118,7 +118,6 @@ RES ResourceFormatLoaderImage::load(const String &p_path, const String &p_origin
 		if (r_error) {
 		if (r_error) {
 			*r_error = ERR_CANT_OPEN;
 			*r_error = ERR_CANT_OPEN;
 		}
 		}
-		memdelete(f);
 		return RES();
 		return RES();
 	}
 	}
 
 

+ 0 - 1
modules/theora/video_stream_theora.cpp

@@ -730,7 +730,6 @@ RES ResourceFormatLoaderTheora::load(const String &p_path, const String &p_origi
 		if (r_error) {
 		if (r_error) {
 			*r_error = ERR_CANT_OPEN;
 			*r_error = ERR_CANT_OPEN;
 		}
 		}
-		memdelete(f);
 		return RES();
 		return RES();
 	}
 	}
 
 

+ 0 - 1
modules/webm/video_stream_webm.cpp

@@ -453,7 +453,6 @@ RES ResourceFormatLoaderWebm::load(const String &p_path, const String &p_origina
 		if (r_error) {
 		if (r_error) {
 			*r_error = ERR_CANT_OPEN;
 			*r_error = ERR_CANT_OPEN;
 		}
 		}
-		memdelete(f);
 		return RES();
 		return RES();
 	}
 	}