diff options
| author | 2018-06-29 13:08:08 -0400 | |
|---|---|---|
| committer | 2018-06-29 13:08:08 -0400 | |
| commit | c18425ef989fd0c7f9bc1bdf4ba6b5e9235a8193 (patch) | |
| tree | cbee8e53a5260571c3abf00cf9ad2d32201a0288 /src | |
| parent | gl_rasterizer_cache: Implement caching for texture and framebuffer surfaces. (diff) | |
| download | yuzu-c18425ef989fd0c7f9bc1bdf4ba6b5e9235a8193.tar.gz yuzu-c18425ef989fd0c7f9bc1bdf4ba6b5e9235a8193.tar.xz yuzu-c18425ef989fd0c7f9bc1bdf4ba6b5e9235a8193.zip | |
gl_rasterizer_cache: Only dereference color_surface/depth_surface if valid.
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 71ad7be74..63f5999ea 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | |||
| @@ -398,14 +398,18 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces( | |||
| 398 | Surface color_surface; | 398 | Surface color_surface; |
| 399 | if (using_color_fb) { | 399 | if (using_color_fb) { |
| 400 | color_surface = GetSurface(color_params); | 400 | color_surface = GetSurface(color_params); |
| 401 | color_rect = color_surface->GetSurfaceParams().GetRect(); | 401 | if (color_surface) { |
| 402 | color_rect = color_surface->GetSurfaceParams().GetRect(); | ||
| 403 | } | ||
| 402 | } | 404 | } |
| 403 | 405 | ||
| 404 | MathUtil::Rectangle<u32> depth_rect{}; | 406 | MathUtil::Rectangle<u32> depth_rect{}; |
| 405 | Surface depth_surface; | 407 | Surface depth_surface; |
| 406 | if (using_depth_fb) { | 408 | if (using_depth_fb) { |
| 407 | depth_surface = GetSurface(depth_params); | 409 | depth_surface = GetSurface(depth_params); |
| 408 | depth_rect = depth_surface->GetSurfaceParams().GetRect(); | 410 | if (depth_surface) { |
| 411 | depth_rect = depth_surface->GetSurfaceParams().GetRect(); | ||
| 412 | } | ||
| 409 | } | 413 | } |
| 410 | 414 | ||
| 411 | MathUtil::Rectangle<u32> fb_rect{}; | 415 | MathUtil::Rectangle<u32> fb_rect{}; |