From 6f6e12a32961120185424c31e32b2dc62a165b5f Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 21 Mar 2018 15:09:08 +0100 Subject: [PATCH] [util] Fix possible crash with null interfaces in private storage --- src/util/com/com_private_data.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/com/com_private_data.cpp b/src/util/com/com_private_data.cpp index b06ade02c..e4d34db3c 100644 --- a/src/util/com/com_private_data.cpp +++ b/src/util/com/com_private_data.cpp @@ -23,7 +23,8 @@ namespace dxvk { const IUnknown* iface) : m_guid (guid), m_iface (const_cast(iface)) { - m_iface->AddRef(); + if (m_iface != nullptr) + m_iface->AddRef(); }