diff options
-rw-r--r-- | riscos/window.c | 7 |
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; |