Improve error handling.

This commit is contained in:
Michael Drake 2014-05-26 11:29:03 +01:00
parent 82bc40350a
commit cb0ae22949

View File

@ -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);
}