From 20cc49bf6139e82bd213b53c8d91c461c4b71865 Mon Sep 17 00:00:00 2001 From: "therealmogminer@gmail.com" Date: Fri, 27 May 2016 15:38:45 +0200 Subject: [PATCH] Fix potential crash when using pillarbox default.lay but not specifying 3 shader chains --- src/osd/modules/render/bgfx/chainmanager.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/osd/modules/render/bgfx/chainmanager.cpp b/src/osd/modules/render/bgfx/chainmanager.cpp index 0b1316280d4..d6e596cfc6b 100644 --- a/src/osd/modules/render/bgfx/chainmanager.cpp +++ b/src/osd/modules/render/bgfx/chainmanager.cpp @@ -300,7 +300,10 @@ void chain_manager::process_screen_quad(uint32_t view, uint32_t screen, render_p { for (bgfx_chain* chain : m_screen_chains) { - chain->repopulate_targets(); + if (chain != nullptr) + { + chain->repopulate_targets(); + } } } @@ -452,7 +455,10 @@ uint32_t chain_manager::handle_screen_chains(uint32_t view, render_primitive *st { for (bgfx_chain* chain : m_screen_chains) { - chain->repopulate_targets(); + if (chain != nullptr) + { + chain->repopulate_targets(); + } } }