diff options
Diffstat (limited to 'frontends/amiga/misc.c')
-rwxr-xr-x | frontends/amiga/misc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/frontends/amiga/misc.c b/frontends/amiga/misc.c index 822d640d0..57afbdd97 100755 --- a/frontends/amiga/misc.c +++ b/frontends/amiga/misc.c @@ -45,6 +45,7 @@ static LONG ami_misc_req(const char *message, uint32 type) { LONG ret = 0; + struct gui_window *cur_gw = ami_gui_get_active_gw(); NSLOG(netsurf, INFO, "%s", message); #ifdef __amigaos4__ @@ -53,7 +54,7 @@ static LONG ami_misc_req(const char *message, uint32 type) TDR_FormatString, message, TDR_GadgetString, messages_get("OK"), TDR_ImageType, type, - TDR_Window, cur_gw ? cur_gw->shared->win : NULL, + TDR_Window, cur_gw ? ami_gui_get_window(cur_gw) : NULL, TAG_DONE); #else struct EasyStruct easyreq = { @@ -64,7 +65,7 @@ static LONG ami_misc_req(const char *message, uint32 type) messages_get("OK"), }; - ret = EasyRequest(cur_gw ? cur_gw->shared->win : NULL, &easyreq, NULL); + ret = EasyRequest(cur_gw ? ami_gui_get_window(cur_gw) : NULL, &easyreq, NULL); #endif return ret; } @@ -246,6 +247,7 @@ char *translate_escape_chars(const char *s) { size_t i, ii, len; char *ret; + char *outs; len = strlen(s); ret = malloc(len + 1); if (ret == NULL) @@ -261,7 +263,9 @@ char *translate_escape_chars(const char *s) } ret[ii] = '\0'; - return ami_utf8_easy(ret); + outs = ami_utf8_easy(ret); + free(ret); + return outs; } /** |