diff --git a/plugins/image/image.h b/plugins/image/image.h index c6a054f..5351390 100644 --- a/plugins/image/image.h +++ b/plugins/image/image.h @@ -49,6 +49,7 @@ extern _QERFileSystemTable g_FileSystemTable; void LoadJPG( const char *filename, unsigned char **pic, int *width, int *height ); #define Error g_FuncTable.m_pfnError +#define vfsGetFileCount g_FileSystemTable.m_pfnGetFileCount #define vfsLoadFile g_FileSystemTable.m_pfnLoadFile #define vfsFreeFile g_FileSystemTable.m_pfnFreeFile diff --git a/plugins/image/lbmlib.cpp b/plugins/image/lbmlib.cpp index e4d54e1..7ad1311 100644 --- a/plugins/image/lbmlib.cpp +++ b/plugins/image/lbmlib.cpp @@ -743,6 +743,10 @@ void LoadImage( const char *name, byte ** pic, int *width, int *height ){ return; } + if ( vfsGetFileCount( name, 0 ) == 0 ) { + return; + } + if ( !g_ascii_strcasecmp( name + len - 4, ".tga" ) ) { LoadTGA( name, pic, width, height ); }