X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;ds=sidebyside;f=nanoWrap.cpp;h=0e997fe783b5cfd83a7d7b6112111472c25d3f6b;hb=ab44ab4e29101bce2bc183dc931250f258f4ce78;hp=5c5eec805314a6a8deb061897e67b88e7b0e7d54;hpb=5bb54c3b963ff631c41dae7c87687f930a3b8c7d;p=nanogl.git diff --git a/nanoWrap.cpp b/nanoWrap.cpp index 5c5eec8..0e997fe 100644 --- a/nanoWrap.cpp +++ b/nanoWrap.cpp @@ -1281,7 +1281,7 @@ void glTexImage2D( GLenum target, GLint level, GLint internalformat, GLsizei wid { unsigned char *data = (unsigned char*)pixels; - if( internalformat == GL_RGB && format == GL_RGBA ) // strip alpha from texture + if( pixels && internalformat == GL_RGB && format == GL_RGBA ) // strip alpha from texture { unsigned char *in = data, *out; int i = 0, size = width * height * 4;