错误处理
This commit is contained in:
@@ -159,7 +159,9 @@ struct Web_Plot_Session::Impl {
|
||||
apply_layout(plot.viewport_size());
|
||||
plot.activate_view();
|
||||
update_model();
|
||||
(void)plot.render_frame(true);
|
||||
const auto initial_render = plot.render_frame(true);
|
||||
if (initial_render != Plot_Render_Error::none)
|
||||
plot.request_redraw();
|
||||
}
|
||||
~Impl() {
|
||||
plot.deactivate_view();
|
||||
@@ -266,7 +268,7 @@ struct Web_Plot_Session::Impl {
|
||||
if (!plot.view_active())
|
||||
return std::nullopt;
|
||||
update_model();
|
||||
if (!plot.render_frame(true))
|
||||
if (plot.render_frame(true) != Plot_Render_Error::none)
|
||||
return std::nullopt;
|
||||
std::string pixels;
|
||||
const Color background = plot.background_color();
|
||||
|
||||
Reference in New Issue
Block a user