diff --git a/amiga/launch.c b/amiga/launch.c index 9ac1c5b5f..1f2b9e16c 100755 --- a/amiga/launch.c +++ b/amiga/launch.c @@ -38,7 +38,7 @@ struct Library *OpenURLBase = NULL; struct OpenURLIFace *IOpenURL = NULL; -struct MinList ami_unsupportedprotocols; +struct MinList *ami_unsupportedprotocols; struct ami_protocol { @@ -65,7 +65,7 @@ static struct ami_protocol *ami_openurl_add_protocol(const char *url) return NULL; } - AddTail((struct List *)&ami_unsupportedprotocols, (struct Node *)ami_p); + AddTail((struct List *)ami_unsupportedprotocols, (struct Node *)ami_p); return ami_p; } @@ -86,6 +86,8 @@ static void ami_openurl_free_list(struct MinList *list) FreeVec(node); node = NULL; }while((node=nnode)); + + FreeVec(list); } static BOOL ami_openurl_check_list(struct MinList *list, nsurl *url) @@ -132,7 +134,7 @@ void ami_openurl_open(void) } } - ami_NewMinList(&ami_unsupportedprotocols); + ami_unsupportedprotocols = ami_AllocMinList(); } void ami_openurl_close(void) @@ -142,7 +144,7 @@ void ami_openurl_close(void) #endif if(OpenURLBase) CloseLibrary(OpenURLBase); - ami_openurl_free_list(&ami_unsupportedprotocols); + ami_openurl_free_list(ami_unsupportedprotocols); } nserror gui_launch_url(struct nsurl *url) @@ -152,7 +154,7 @@ nserror gui_launch_url(struct nsurl *url) #endif char *launchurl = NULL; - if(ami_openurl_check_list(&ami_unsupportedprotocols, url) == FALSE) + if(ami_openurl_check_list(ami_unsupportedprotocols, url) == FALSE) { if(IOpenURL) { diff --git a/amiga/object.h b/amiga/object.h index 6ea9bd1b1..be9650413 100755 --- a/amiga/object.h +++ b/amiga/object.h @@ -57,7 +57,6 @@ void FreeObjList(struct MinList *objlist); /** List abstraction as OS3 appears to have problems with NewMinList() **/ struct MinList *ami_AllocMinList(void); -void ami_NewMinList(struct MinList *list); /** Initialisation for itempool **/ bool ami_object_init(void); diff --git a/amiga/tree.c b/amiga/tree.c index 54082099f..3fdb529d7 100644 --- a/amiga/tree.c +++ b/amiga/tree.c @@ -109,7 +109,7 @@ struct treeview_window { char *sslerr; char *sslaccept; char *sslreject; - struct MinList shared_pens; + struct MinList *shared_pens; }; struct ami_tree_redraw_req { @@ -887,7 +887,8 @@ void ami_tree_close(struct treeview_window *twin) DisposeObject(twin->objects[OID_MAIN]); DelObjectNoFree(twin->node); ami_free_layers(&twin->globals); - ami_plot_release_pens(&twin->shared_pens); + ami_plot_release_pens(twin->shared_pens); + FreeVec(twin->shared_pens); for(i=0;imenu_name[i] && (twin->menu_name[i] != NM_BARLABEL)) @@ -1485,8 +1486,8 @@ struct treeview_window *ami_tree_create(int flags, twin->ssl_data = ssl_data; twin->tree = tree_create(flags, &ami_tree_callbacks, twin); - ami_NewMinList(&twin->shared_pens); - twin->globals.shared_pens = &twin->shared_pens; + twin->shared_pens = ami_AllocMinList(); + twin->globals.shared_pens = twin->shared_pens; return twin; }