summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-11-21 22:49:02 +0000
committerJames Bursa <james@netsurf-browser.org>2004-11-21 22:49:02 +0000
commitdfad215d1b5fffdb8b8cbeee02f176f7a28f0d65 (patch)
tree20d542f5120794e58d615a08e606b1e1f0ce5af8 /riscos
parent48ee62b660ec68ae4a905a81544b4c3f18e69a8f (diff)
downloadnetsurf-dfad215d1b5fffdb8b8cbeee02f176f7a28f0d65.tar.gz
netsurf-dfad215d1b5fffdb8b8cbeee02f176f7a28f0d65.tar.bz2
[project @ 2004-11-21 22:49:02 by bursa]
Fix crash when certain MNGs are opened in a new browser window. svn path=/import/netsurf/; revision=1368
Diffstat (limited to 'riscos')
-rw-r--r--riscos/window.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/riscos/window.c b/riscos/window.c
index a413edc2b..42062718b 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -513,6 +513,11 @@ void gui_window_update_box(struct gui_window *g,
int clip_x0, clip_y0, clip_x1, clip_y1;
os_error *error;
+ /* in some cases an update can be triggered before a content has fully
+ * loaded, so current_content is 0 */
+ if (!c)
+ return;
+
update.w = g->window;
update.box.x0 = floorf(data->redraw.x * 2 * g->option.scale);
update.box.y0 = -ceilf((data->redraw.y + data->redraw.height) * 2 *
@@ -915,7 +920,7 @@ void ro_gui_window_open(struct gui_window *g, wimp_open *open)
g->reformat_pending = true;
gui_reformat_pending = true;
}
-
+
g->old_width = width;
g->old_height = height;