summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5bb54c3)
raw | patch | inline | side by side (parent: 5bb54c3)
author | mittorn <mittorn@sibmail.com> | |
Sat, 19 Aug 2017 15:30:06 +0000 (15:30 +0000) | ||
committer | mittorn <mittorn@sibmail.com> | |
Sat, 19 Aug 2017 15:30:06 +0000 (15:30 +0000) |
nanoWrap.cpp | patch | blob | history |
diff --git a/nanoWrap.cpp b/nanoWrap.cpp
index 5c5eec805314a6a8deb061897e67b88e7b0e7d54..0e997fe783b5cfd83a7d7b6112111472c25d3f6b 100644 (file)
--- 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;