From a83840351d3f68534180f038724ecd089c963b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Wed, 9 Sep 2015 13:14:58 +0200 Subject: [PATCH] fix infinite recursion bug with local image --- RNGL/GLImage.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RNGL/GLImage.m b/RNGL/GLImage.m index 53334fc..e9c4d20 100644 --- a/RNGL/GLImage.m +++ b/RNGL/GLImage.m @@ -79,8 +79,9 @@ RCT_NOT_IMPLEMENTED(-init) // Load the image (without resizing it) if (![_src hasPrefix:@"http://"] && ![_src hasPrefix:@"https://"]) { + // N.B: in this case we don't trigger onload because image is already loaded. + // this behavior is specific to GLCanvas needs self.image = [UIImage imageNamed:_src]; - if(_onload) _onload(); } else { _loading = [_bridge.imageLoader loadImageWithTag:_src size:CGSizeZero -- 2.26.2