Commit d9dcbf35 authored by Gaëtan Renaudeau's avatar Gaëtan Renaudeau

Fixes #16: fix `null` texture to crash

parent 1a3bdce4
......@@ -194,7 +194,7 @@ RCT_NOT_IMPLEMENTED(-init)
if (type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE) {
uniforms[uniformName] = [NSNumber numberWithInt:units++];
if (!value) {
if ([value isEqual:[NSNull null]]) {
GLTexture *emptyTexture = [[GLTexture alloc] init];
[emptyTexture setPixelsEmpty];
textures[uniformName] = emptyTexture;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment