Fix crashing

svn path=/trunk/netsurf/; revision=12362
This commit is contained in:
Chris Young 2011-05-09 22:39:30 +00:00
parent 48be9f6939
commit 5c95b32756
2 changed files with 4 additions and 2 deletions

View File

@ -79,7 +79,7 @@ nserror amiga_dt_picture_init(void)
lwc_error lerror;
nserror error;
BPTR fh = 0;
struct Node *node;
struct Node *node = NULL;
while((dt = ObtainDataType(DTST_RAM, NULL,
DTA_DataType, prevdt,

View File

@ -340,7 +340,7 @@ void ami_mime_entry_free(struct ami_mime_entry *mimeentry)
struct Node *ami_mime_from_datatype(struct DataType *dt,
lwc_string **mimetype, struct Node *start_node)
{
struct DataTypeHeader *dth = dt->dtn_Header;
struct DataTypeHeader *dth;
struct nsObject *node;
struct nsObject *nnode;
struct ami_mime_entry *mimeentry;
@ -349,7 +349,9 @@ struct Node *ami_mime_from_datatype(struct DataType *dt,
bool ret = false;
if(IsMinListEmpty(ami_mime_list)) return NULL;
if(dt == NULL) return NULL;
dth = dt->dtn_Header;
lerror = lwc_intern_string(dth->dth_Name, strlen(dth->dth_Name), &dt_name);
if (lerror != lwc_error_ok)
return NULL;