summaryrefslogtreecommitdiff
path: root/frontends/amiga/history_local.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2017-02-13 17:46:20 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2017-02-13 17:46:20 +0000
commit075e9c0258bd75307a90b3e6bd576742bf212b08 (patch)
treed915cc2b8788b585e8123e9715ff623eed0f1717 /frontends/amiga/history_local.c
parentedaa9c29f22a550ddc7c8e1f02ff6d9dedf9a5b1 (diff)
downloadnetsurf-075e9c0258bd75307a90b3e6bd576742bf212b08.tar.gz
netsurf-075e9c0258bd75307a90b3e6bd576742bf212b08.tar.bz2
Alloc gui_global structure when initialising
Diffstat (limited to 'frontends/amiga/history_local.c')
-rwxr-xr-xfrontends/amiga/history_local.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/frontends/amiga/history_local.c b/frontends/amiga/history_local.c
index 8cce869c9..8ebfc7e65 100755
--- a/frontends/amiga/history_local.c
+++ b/frontends/amiga/history_local.c
@@ -132,9 +132,7 @@ void ami_history_open(struct gui_window *gw)
if(!gw->hw)
{
gw->hw = calloc(1, sizeof(struct history_window));
- gw->hw->gg = calloc(1, sizeof(struct gui_globals));
-
- ami_init_layers(gw->hw->gg, scrn->Width, scrn->Height, false);
+ gw->hw->gg = ami_plot_ra_alloc(scrn->Width, scrn->Height, false);
gw->hw->gw = gw;
browser_window_history_size(gw->bw, &width, &height);
@@ -239,8 +237,7 @@ static bool ami_history_click(struct history_window *hw, uint16 code)
void ami_history_close(struct history_window *hw)
{
- ami_free_layers(hw->gg);
- free(hw->gg);
+ ami_plot_ra_free(hw->gg);
hw->gw->hw = NULL;
DisposeObject(hw->objects[OID_MAIN]);
ami_gui_win_list_remove(hw);