diff options
| author | Ray <[email protected]> | 2021-11-15 11:41:05 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-11-15 11:41:05 +0100 |
| commit | be371ebf99043fd77d579856fd079e8cf4a0e67b (patch) | |
| tree | f56a2aa5346ef839fee636c390d2e7b20dab83b9 /src | |
| parent | b7bf22059875417be1b42c3e39e234d28f71fc11 (diff) | |
| download | raylib-be371ebf99043fd77d579856fd079e8cf4a0e67b.tar.gz raylib-be371ebf99043fd77d579856fd079e8cf4a0e67b.zip | |
REVIEWED: LoadTextureFromImage()
Allow texture loading with no data transfer (in case image.data = NULL)
Diffstat (limited to 'src')
| -rw-r--r-- | src/rtextures.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rtextures.c b/src/rtextures.c index 34c4685f..ceb1586c 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -2812,7 +2812,7 @@ Texture2D LoadTextureFromImage(Image image) { Texture2D texture = { 0 }; - if ((image.data != NULL) && (image.width != 0) && (image.height != 0)) + if ((image.width != 0) && (image.height != 0)) { texture.id = rlLoadTexture(image.data, image.width, image.height, image.format, image.mipmaps); } |
