mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
If Intel metrics device version check fails, don't call invalid function
This commit is contained in:
@@ -45,14 +45,17 @@ IntelCounters::~IntelCounters()
|
||||
{
|
||||
SAFE_RELEASE(m_deviceContext);
|
||||
|
||||
if(CloseMetricsDevice)
|
||||
{
|
||||
if(CloseMetricsDevice && m_metricsDevice)
|
||||
CloseMetricsDevice(m_metricsDevice);
|
||||
m_metricsDevice = NULL;
|
||||
}
|
||||
|
||||
m_metricsDevice = NULL;
|
||||
|
||||
if(m_MDLibraryHandle)
|
||||
FreeLibrary(m_MDLibraryHandle);
|
||||
|
||||
m_MDLibraryHandle = (HMODULE)0;
|
||||
OpenMetricsDevice = NULL;
|
||||
CloseMetricsDevice = NULL;
|
||||
}
|
||||
|
||||
void IntelCounters::Load()
|
||||
@@ -95,8 +98,11 @@ bool IntelCounters::Init(void *pContext)
|
||||
{
|
||||
CloseMetricsDevice(m_metricsDevice);
|
||||
FreeLibrary(m_MDLibraryHandle);
|
||||
|
||||
m_metricsDevice = NULL;
|
||||
m_MDLibraryHandle = (HMODULE)0;
|
||||
OpenMetricsDevice = NULL;
|
||||
CloseMetricsDevice = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user