and chekc soem string pointers

SVN revision: 6576
This commit is contained in:
Carsten Haitzler 2003-01-13 06:22:02 +00:00
parent d814b97a3e
commit 19452d7a6f
1 changed files with 3 additions and 2 deletions

View File

@ -309,7 +309,8 @@ eet_open(char *file, Eet_File_Mode mode)
{
Eet_File *ef;
char buf[PATH_MAX];
if (!file) return NULL;
/* in case this is a symlink... find out where it REALLY points */
if (!realpath(file, buf))
{
@ -632,7 +633,7 @@ eet_read(Eet_File *ef, char *name, int *size_ret)
int hash, i, num;
/* check to see its' an eet file pointer */
if ((!ef) || (ef->magic != EET_MAGIC_FILE))
if ((!ef) || (ef->magic != EET_MAGIC_FILE) || (!name))
{
if (size_ret) *size_ret = 0;
return NULL;