mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-22 22:03:00 +05:30
Added check for file data on exporttextures()
This commit is contained in:
parent
f884d0bf58
commit
5b40ffb00b
@ -55,7 +55,7 @@ void write(const char *filename,
|
|||||||
bool unpackpld(const char *filedata,
|
bool unpackpld(const char *filedata,
|
||||||
unsigned int filesize,
|
unsigned int filesize,
|
||||||
const char *filename) {
|
const char *filename) {
|
||||||
if (filedata == NULL || filesize <= 0) {
|
if (filedata == NULL || filesize <= 0 || filename == NULL) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
struct PldHeader h;
|
struct PldHeader h;
|
||||||
@ -80,7 +80,7 @@ void exporttextures(const char *filedata,
|
|||||||
struct Texture *t = NULL;
|
struct Texture *t = NULL;
|
||||||
struct TextureBatchDescriptor *d = NULL;
|
struct TextureBatchDescriptor *d = NULL;
|
||||||
char * fmt = NULL;
|
char * fmt = NULL;
|
||||||
if (filename == NULL || filesize == 0) {
|
if (filedata == NULL || filesize == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
p = (struct TexturePack*)filedata;
|
p = (struct TexturePack*)filedata;
|
||||||
|
Loading…
Reference in New Issue
Block a user