Fix segmentation fault that sometimes occurs on release builds

Fixes SWDEV-216441

Change-Id: I3ea01a4edd14000a103de751757dfaadc7d358bb


[ROCm/rocm_smi_lib commit: 0bf81ed2f9]
This commit is contained in:
Chris Freehill
2020-02-24 17:17:26 -06:00
parent 95d3da04b9
commit e4d918aa70
@@ -51,7 +51,7 @@
#include <string>
#define DBG_FILE_ERROR(FN, WR_STR) \
if (env_->debug_output_bitfield & RSMI_DEBUG_SYSFS_FILE_PATHS) { \
if (env_ && env_->debug_output_bitfield & RSMI_DEBUG_SYSFS_FILE_PATHS) { \
std::cout << "*****" << __FUNCTION__ << std::endl; \
std::cout << "*****Opening file: " << (FN) << std::endl; \
if ((WR_STR) != nullptr) { \