diff options
| author | raysan5 <[email protected]> | 2017-08-06 10:43:43 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2017-08-06 10:43:43 +0200 |
| commit | 0169b72bdca6890426f1e7f1824e7225afcb18ee (patch) | |
| tree | 1ad197605c8a0f8abadf88bf5f4cfe11fe65950c /src/textures.c | |
| parent | 6369b47f1190c1106448383ec557b9bb9be3dfcc (diff) | |
| download | raylib-0169b72bdca6890426f1e7f1824e7225afcb18ee.tar.gz raylib-0169b72bdca6890426f1e7f1824e7225afcb18ee.zip | |
Minor tweaks
Diffstat (limited to 'src/textures.c')
| -rw-r--r-- | src/textures.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/textures.c b/src/textures.c index 1436111f..0d8727db 100644 --- a/src/textures.c +++ b/src/textures.c @@ -407,7 +407,7 @@ RenderTexture2D LoadRenderTexture(int width, int height) // Unload image from CPU memory (RAM) void UnloadImage(Image image) { - free(image.data); + if (image.data != NULL) free(image.data); // NOTE: It becomes anoying every time a texture is loaded //TraceLog(LOG_INFO, "Unloaded image data"); @@ -1759,7 +1759,7 @@ void SetTextureWrap(Texture2D texture, int wrapMode) // Draw a Texture2D void DrawTexture(Texture2D texture, int posX, int posY, Color tint) { - DrawTextureEx(texture, (Vector2){ (float)posX, (float)posY }, 0, 1.0f, tint); + DrawTextureEx(texture, (Vector2){ (float)posX, (float)posY }, 0.0f, 1.0f, tint); } // Draw a Texture2D with position defined as Vector2 |
