From 04b765a67425cdd372accd9480ae167d4076257d Mon Sep 17 00:00:00 2001 From: Akash Date: Wed, 14 Oct 2015 21:19:05 +0530 Subject: [PATCH] gsdx: check for null deference. CID 146839 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)11. var_deref_model: Passing null pointer fb_pages to UsePages, which dereferences it. CID 146840 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)11. var_deref_model: Passing null pointer zb_pages to UsePages, which dereferences it. * Prevent a potential null pointer deference in ```void GSRendererSW::UsePages()``` --- plugins/GSdx/GSRendererSW.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/GSdx/GSRendererSW.cpp b/plugins/GSdx/GSRendererSW.cpp index 2398e200bc..64cc290220 100644 --- a/plugins/GSdx/GSRendererSW.cpp +++ b/plugins/GSdx/GSRendererSW.cpp @@ -1572,12 +1572,12 @@ void GSRendererSW::SharedData::UsePages(const uint32* fb_pages, int fpsm, const { //TransactionScope scope(s_lock); - if(global.sel.fb) + if(global.sel.fb && fb_pages != NULL) { m_parent->UsePages(fb_pages, 0); } - if(global.sel.zb) + if(global.sel.zb && zb_pages != NULL) { m_parent->UsePages(zb_pages, 1); }