mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-17 01:33:16 +03:00
Improve error handling.
This commit is contained in:
parent
82bc40350a
commit
cb0ae22949
@ -328,6 +328,11 @@ void ro_gui_progress_bar_update(struct progress_bar *pb, int width, int height)
|
|||||||
redraw.box = pb->visible;
|
redraw.box = pb->visible;
|
||||||
redraw.box.x0 = cur.x1;
|
redraw.box.x0 = cur.x1;
|
||||||
error = xwimp_update_window(&redraw, &more);
|
error = xwimp_update_window(&redraw, &more);
|
||||||
|
if (error) {
|
||||||
|
LOG(("Error getting update window: 0x%x: %s",
|
||||||
|
error->errnum, error->errmess));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (more)
|
if (more)
|
||||||
ro_gui_progress_bar_redraw_window(&redraw, pb);
|
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.w = pb->w;
|
||||||
redraw.box = pb->visible;
|
redraw.box = pb->visible;
|
||||||
error = xwimp_update_window(&redraw, &more);
|
error = xwimp_update_window(&redraw, &more);
|
||||||
|
if (error != NULL) {
|
||||||
|
LOG(("Error getting update window: '%s'", error->errmess));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (more)
|
if (more)
|
||||||
ro_gui_progress_bar_redraw_window(&redraw, pb);
|
ro_gui_progress_bar_redraw_window(&redraw, pb);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user