fix various problems, thanks CppCheck :) (#1005)
* explained a bit more the core_window_letterbox example * fixed a few 'ups' moments that could lead to mild head pain and time loss
This commit is contained in:
parent
64c588e9d8
commit
75b0264f35
1 changed files with 37 additions and 10 deletions
|
|
@ -1887,6 +1887,13 @@ unsigned int rlLoadTexture(void *data, int width, int height, int format, int mi
|
|||
#endif
|
||||
#endif // GRAPHICS_API_OPENGL_11
|
||||
|
||||
if( data == NULL ){
|
||||
//ups!
|
||||
TraceLog(LOG_WARNING, "Got asked to load texture from a NULL pointer!");
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
glGenTextures(1, &id); // Generate texture id
|
||||
|
|
|
|||
Loading…
Reference in a new issue