diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/array.cpp | 1 | ||||
-rw-r--r-- | core/io/image_loader.cpp | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/core/array.cpp b/core/array.cpp index 9708452850..9f09ddbe15 100644 --- a/core/array.cpp +++ b/core/array.cpp @@ -258,6 +258,7 @@ struct _ArrayVariantSortCustom { Array &Array::sort_custom(Object *p_obj, const StringName &p_function) { ERR_FAIL_NULL_V(p_obj, *this); + ERR_FAIL_COND_V(!p_obj->has_method(p_function), *this); SortArray<Variant, _ArrayVariantSortCustom, true> avs; avs.compare.obj = p_obj; diff --git a/core/io/image_loader.cpp b/core/io/image_loader.cpp index f202320043..3ae9ff676c 100644 --- a/core/io/image_loader.cpp +++ b/core/io/image_loader.cpp @@ -118,7 +118,6 @@ RES ResourceFormatLoaderImage::load(const String &p_path, const String &p_origin if (r_error) { *r_error = ERR_CANT_OPEN; } - memdelete(f); return RES(); } |