Skip to content
Snippets Groups Projects
Commit c18425ef authored by bunnei's avatar bunnei
Browse files

gl_rasterizer_cache: Only dereference color_surface/depth_surface if valid.

parent 1dd75459
No related branches found
No related tags found
No related merge requests found
...@@ -398,14 +398,18 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces( ...@@ -398,14 +398,18 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(
Surface color_surface; Surface color_surface;
if (using_color_fb) { if (using_color_fb) {
color_surface = GetSurface(color_params); color_surface = GetSurface(color_params);
color_rect = color_surface->GetSurfaceParams().GetRect(); if (color_surface) {
color_rect = color_surface->GetSurfaceParams().GetRect();
}
} }
MathUtil::Rectangle<u32> depth_rect{}; MathUtil::Rectangle<u32> depth_rect{};
Surface depth_surface; Surface depth_surface;
if (using_depth_fb) { if (using_depth_fb) {
depth_surface = GetSurface(depth_params); depth_surface = GetSurface(depth_params);
depth_rect = depth_surface->GetSurfaceParams().GetRect(); if (depth_surface) {
depth_rect = depth_surface->GetSurfaceParams().GetRect();
}
} }
MathUtil::Rectangle<u32> fb_rect{}; MathUtil::Rectangle<u32> fb_rect{};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment