From 475cf91f3ccb1b4a8da692fb26b175e48cf12ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Wed, 7 Oct 2015 12:24:50 +0200 Subject: [PATCH] Fixes #17 --- RNGL/GLCanvas.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RNGL/GLCanvas.m b/RNGL/GLCanvas.m index e5e19de..db240c9 100644 --- a/RNGL/GLCanvas.m +++ b/RNGL/GLCanvas.m @@ -216,8 +216,9 @@ RCT_NOT_IMPLEMENTED(-init) images[src] = image; } if (image == nil) { + __weak GLCanvas *weakSelf = self; image = [[GLImage alloc] initWithBridge:_bridge withOnLoad:^{ - [self onImageLoad:src]; + if (weakSelf) [weakSelf onImageLoad:src]; }]; image.src = src; images[src] = image; -- 2.26.2