summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Present.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2023-02-18 12:28:15 -0800
committerPokechu22 <Pokechu022@gmail.com>2023-03-02 11:08:49 -0800
commit78428dd8db9e6711cb3bf77b7dc8c99998d8ba72 (patch)
tree0835a50083647a58b10561fbcfc258afa7d4fb7e /Source/Core/VideoCommon/Present.cpp
parent4a2d3c83c77f71334bcb167621bcdde8f89efe87 (diff)
Software: Fix crash on startup when using "Compile Shaders Before Starting"
When that setting is enabled, m_xfb_entry is initially not present (during the phase where a shader compilation progress bar would be shown). The main path checks for m_xfb_entry, but the software renderer fallback path didn't. Fixes another aspect of https://bugs.dolphin-emu.org/issues/13172.
Diffstat (limited to 'Source/Core/VideoCommon/Present.cpp')
-rw-r--r--Source/Core/VideoCommon/Present.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Present.cpp b/Source/Core/VideoCommon/Present.cpp
index 181dfea140..78e09de3e5 100644
--- a/Source/Core/VideoCommon/Present.cpp
+++ b/Source/Core/VideoCommon/Present.cpp
@@ -521,9 +521,10 @@ void Presenter::Present()
if (!g_gfx->SupportsUtilityDrawing())
{
- // Video Software doesn't support Drawing a UI or doing post-processing
- // So just Show the XFB
- g_gfx->ShowImage(m_xfb_entry->texture.get(), m_xfb_rect);
+ // Video Software doesn't support drawing a UI or doing post-processing
+ // So just show the XFB
+ if (m_xfb_entry)
+ g_gfx->ShowImage(m_xfb_entry->texture.get(), m_xfb_rect);
return;
}