mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
gl_rasterizer_cache: Only dereference color_surface/depth_surface if valid.
This commit is contained in:
parent
1dd754590f
commit
c18425ef98
|
@ -398,14 +398,18 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(
|
|||
Surface color_surface;
|
||||
if (using_color_fb) {
|
||||
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{};
|
||||
Surface depth_surface;
|
||||
if (using_depth_fb) {
|
||||
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{};
|
||||
|
|
Loading…
Reference in a new issue