From 912051439eef43f01f5387abc2d5474e5d34a183 Mon Sep 17 00:00:00 2001 From: gilzoide Date: Thu, 12 Oct 2023 11:49:58 -0300 Subject: [PATCH] Avoid processing data in branch that won't use it --- src/GDObject.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GDObject.mm b/src/GDObject.mm index bddc3f8..1fec15e 100644 --- a/src/GDObject.mm +++ b/src/GDObject.mm @@ -84,8 +84,8 @@ - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { } - (void)forwardInvocation:(NSInvocation *)anInvocation { - String methodName = [GDObject godotNameForSelector:anInvocation.selector]; if (_obj) { + String methodName = [GDObject godotNameForSelector:anInvocation.selector]; if (_obj->has_method(methodName)) { Array args = anInvocation.argumentArray; Variant result = _obj->callv(methodName, args);