2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

gl_rasterizer_cache: Only dereference color_surface/depth_surface if valid.

This commit is contained in:
bunnei 2018-06-29 13:08:08 -04:00
parent 1dd754590f
commit c18425ef98

View file

@ -398,15 +398,19 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(
Surface color_surface;
if (using_color_fb) {
color_surface = GetSurface(color_params);
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);
if (depth_surface) {
depth_rect = depth_surface->GetSurfaceParams().GetRect();
}
}
MathUtil::Rectangle<u32> fb_rect{};
if (color_surface && depth_surface) {