Skip to content

Commit

Permalink
Fix crash when registering null descriptor resource view in D3D12
Browse files Browse the repository at this point in the history
  • Loading branch information
crosire committed Apr 14, 2024
1 parent e15bf0f commit a59d611
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/d3d12/d3d12_impl_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1996,7 +1996,7 @@ void reshade::d3d12::device_impl::unregister_resource(ID3D12Resource *resource)
void reshade::d3d12::device_impl::register_resource_view(D3D12_CPU_DESCRIPTOR_HANDLE handle, ID3D12Resource *resource, api::resource_view_desc desc)
{
// Get default view description when none was provided
if (desc.format == api::format::unknown)
if (resource != nullptr && desc.type == api::resource_view_type::unknown)
desc = convert_resource_view_desc(resource->GetDesc());

const std::unique_lock<std::shared_mutex> lock(_resource_mutex);
Expand Down

0 comments on commit a59d611

Please sign in to comment.