Protect against buffers that actually don't have their contents mapped
This commit is contained in:
parent
71fb011bd0
commit
da45d16388
2 changed files with 6 additions and 0 deletions
|
@ -216,6 +216,9 @@ void ImGuiPass::update_buffers(RenderTarget& target, const ImDrawData& draw_data
|
|||
auto vtx_map = engine->get_gfx()->get_buffer_contents(target.vertex_buffer[target.current_frame]);
|
||||
auto idx_map = engine->get_gfx()->get_buffer_contents(target.index_buffer[target.current_frame]);
|
||||
|
||||
if(vtx_map == nullptr || idx_map == nullptr)
|
||||
return;
|
||||
|
||||
auto vtx_dst = (ImDrawVert*)vtx_map;
|
||||
auto idx_dst = (ImDrawIdx*)idx_map;
|
||||
|
||||
|
|
|
@ -265,6 +265,9 @@ void ShadowPass::render_point(GFXCommandBuffer* command_buffer, Scene& scene, pr
|
|||
if((last_point_light + 1) == max_point_shadows)
|
||||
return;
|
||||
|
||||
if(point_location_map == nullptr)
|
||||
return;
|
||||
|
||||
if(scene.point_light_dirty[last_point_light] || light.use_dynamic_shadows) {
|
||||
const prism::float3 lightPos = scene.get<Transform>(light_object).get_world_position();
|
||||
|
||||
|
|
Reference in a new issue