diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-04-27 18:32:49 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-04-27 18:32:49 +0100 |
commit | 7bc29f778280c8b4138206313774f5c589a8da4e (patch) | |
tree | b2953aa7e7db0c46a6076a7657545f6144628142 /amiga | |
parent | ad779dc38a90b2dd243fa20fe4c504ae21985999 (diff) | |
download | netsurf-7bc29f778280c8b4138206313774f5c589a8da4e.tar.gz netsurf-7bc29f778280c8b4138206313774f5c589a8da4e.tar.bz2 |
Attempt to fix spurious plotter crashes
Diffstat (limited to 'amiga')
-rw-r--r-- | amiga/bitmap.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/amiga/bitmap.c b/amiga/bitmap.c index 2aca7a3ba..c2fd2e786 100644 --- a/amiga/bitmap.c +++ b/amiga/bitmap.c @@ -522,6 +522,7 @@ static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle *content) int plot_height; struct MinList shared_pens; struct gui_globals bm_globals; + struct gui_globals *temp_gg = glob; struct redraw_context ctx = { .interactive = false, @@ -562,12 +563,18 @@ static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle *content) #endif /**\todo In theory we should be able to move the bitmap to our native area - to try to avoid re-conversion */ + to try to avoid re-conversion (at the expense of memory) */ ami_free_layers(&bm_globals); ami_plot_release_pens(&shared_pens); amiga_bitmap_set_opaque(bitmap, true); + /* Restore previous render area. This is set when plotting starts, + * but if bitmap_render is called *during* a browser render then + * having an invalid pointer here causes NetSurf to crash. + */ + glob = temp_gg; + return NSERROR_OK; } |