File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed 
include/godot_cpp/classes Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,9 @@ template <typename T>
230230struct  PtrToArg <Ref<T>> {
231231_FORCE_INLINE_ static  Ref<T> convert (const  void  *p_ptr) {
232232GDExtensionRefPtr ref = (GDExtensionRefPtr)p_ptr;
233- ERR_FAIL_NULL_V (p_ptr, Ref<T>());
233+ if  (unlikely (!p_ptr)) {
234+ return  Ref<T>();
235+ }
234236return  Ref<T>(reinterpret_cast <T *>(godot::internal::get_object_instance_binding (godot::internal::gdextension_interface_ref_get_object (ref))));
235237}
236238
@@ -254,7 +256,9 @@ struct PtrToArg<const Ref<T> &> {
254256
255257_FORCE_INLINE_ static  Ref<T> convert (const  void  *p_ptr) {
256258GDExtensionRefPtr ref = const_cast <GDExtensionRefPtr>(p_ptr);
257- ERR_FAIL_NULL_V (p_ptr, Ref<T>());
259+ if  (unlikely (!p_ptr)) {
260+ return  Ref<T>();
261+ }
258262return  Ref<T>(reinterpret_cast <T *>(godot::internal::get_object_instance_binding (godot::internal::gdextension_interface_ref_get_object (ref))));
259263}
260264};
                         You can’t perform that action at this time. 
           
                  
0 commit comments