mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-22 13:53:02 +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,
|
||||
unsigned int filesize,
|
||||
const char *filename) {
|
||||
if (filedata == NULL || filesize <= 0) {
|
||||
if (filedata == NULL || filesize <= 0 || filename == NULL) {
|
||||
return false;
|
||||
}
|
||||
struct PldHeader h;
|
||||
@ -80,7 +80,7 @@ void exporttextures(const char *filedata,
|
||||
struct Texture *t = NULL;
|
||||
struct TextureBatchDescriptor *d = NULL;
|
||||
char * fmt = NULL;
|
||||
if (filename == NULL || filesize == 0) {
|
||||
if (filedata == NULL || filesize == 0) {
|
||||
return;
|
||||
}
|
||||
p = (struct TexturePack*)filedata;
|
||||
|
Loading…
Reference in New Issue
Block a user