mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-11-02 13:27:52 +00:00
gl_rasterizer_cache: Only dereference color_surface/depth_surface if valid.
This commit is contained in:
parent
1dd754590f
commit
c18425ef98
1 changed files with 6 additions and 2 deletions
|
@ -398,15 +398,19 @@ 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);
|
||||||
|
if (color_surface) {
|
||||||
color_rect = color_surface->GetSurfaceParams().GetRect();
|
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);
|
||||||
|
if (depth_surface) {
|
||||||
depth_rect = depth_surface->GetSurfaceParams().GetRect();
|
depth_rect = depth_surface->GetSurfaceParams().GetRect();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MathUtil::Rectangle<u32> fb_rect{};
|
MathUtil::Rectangle<u32> fb_rect{};
|
||||||
if (color_surface && depth_surface) {
|
if (color_surface && depth_surface) {
|
||||||
|
|
Loading…
Reference in a new issue