mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-17 17:52:43 +03:00
Check menuobj before we dispose it
This commit is contained in:
parent
b429a89ed6
commit
87ebe66880
14
amiga/menu.c
14
amiga/menu.c
@ -517,19 +517,15 @@ void ami_free_menulabs(struct gui_window_2 *gwin)
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i=0;i<=AMI_MENU_AREXX_MAX;i++)
|
||||
{
|
||||
if(gwin->menulab[i] && (gwin->menulab[i] != NM_BARLABEL))
|
||||
{
|
||||
if(gwin->menutype[i] & MENU_IMAGE)
|
||||
{
|
||||
DisposeObject(gwin->menuobj[i]);
|
||||
for(i=0;i<=AMI_MENU_AREXX_MAX;i++) {
|
||||
if(gwin->menulab[i] && (gwin->menulab[i] != NM_BARLABEL)) {
|
||||
if(gwin->menutype[i] & MENU_IMAGE) {
|
||||
if(gwin->menuobj[i]) DisposeObject(gwin->menuobj[i]);
|
||||
}
|
||||
|
||||
ami_utf8_free(gwin->menulab[i]);
|
||||
|
||||
if(i >= AMI_MENU_AREXX)
|
||||
{
|
||||
if(i >= AMI_MENU_AREXX) {
|
||||
if(gwin->menu_hook[i].h_Data) free(gwin->menu_hook[i].h_Data);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user