Skip to content

Commit

Permalink
Cleanup check for image pixels in GL create texture function.
Browse files Browse the repository at this point in the history
  • Loading branch information
xwidghet committed Apr 7, 2018
1 parent ab42745 commit 50656e8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/RageDisplay_OGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2202,9 +2202,9 @@ unsigned RageDisplay_Legacy::CreateTexture(

DebugFlushGLErrors();

if (bGenerateMipMaps)
if (pImg->pixels)
{
if (pImg->pixels)
if (bGenerateMipMaps)
{
glTexImage2D(
GL_TEXTURE_2D, 0, glTexFormat,
Expand All @@ -2215,10 +2215,7 @@ unsigned RageDisplay_Legacy::CreateTexture(

DebugAssertNoGLError();
}
}
else
{
if (pImg->pixels)
else
{
glTexImage2D(
GL_TEXTURE_2D, 0, glTexFormat,
Expand Down

0 comments on commit 50656e8

Please sign in to comment.