From cb0ae229491ee12293f066e99939e11d1b9daed4 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 26 May 2014 11:29:03 +0100 Subject: Improve error handling. --- riscos/gui/progress_bar.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'riscos') diff --git a/riscos/gui/progress_bar.c b/riscos/gui/progress_bar.c index cd4b08929..09b3edb45 100644 --- a/riscos/gui/progress_bar.c +++ b/riscos/gui/progress_bar.c @@ -328,6 +328,11 @@ void ro_gui_progress_bar_update(struct progress_bar *pb, int width, int height) redraw.box = pb->visible; redraw.box.x0 = cur.x1; error = xwimp_update_window(&redraw, &more); + if (error) { + LOG(("Error getting update window: 0x%x: %s", + error->errnum, error->errmess)); + return; + } if (more) ro_gui_progress_bar_redraw_window(&redraw, pb); } @@ -383,6 +388,10 @@ void ro_gui_progress_bar_animate(void *p) redraw.w = pb->w; redraw.box = pb->visible; error = xwimp_update_window(&redraw, &more); + if (error != NULL) { + LOG(("Error getting update window: '%s'", error->errmess)); + return; + } if (more) ro_gui_progress_bar_redraw_window(&redraw, pb); } -- cgit v1.2.3