diff --git a/amiga/dt_picture.c b/amiga/dt_picture.c index c86d5321e..f2350fe75 100644 --- a/amiga/dt_picture.c +++ b/amiga/dt_picture.c @@ -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, diff --git a/amiga/filetype.c b/amiga/filetype.c index 009ce6d64..50d02cb0a 100644 --- a/amiga/filetype.c +++ b/amiga/filetype.c @@ -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;