From e4d918aa7009dd196e022b24ebcf23dd0299a09b Mon Sep 17 00:00:00 2001 From: Chris Freehill Date: Mon, 24 Feb 2020 17:17:26 -0600 Subject: [PATCH] Fix segmentation fault that sometimes occurs on release builds Fixes SWDEV-216441 Change-Id: I3ea01a4edd14000a103de751757dfaadc7d358bb [ROCm/rocm_smi_lib commit: 0bf81ed2f9b6a487cde6bb7be0ea370231cad037] --- projects/rocm-smi-lib/include/rocm_smi/rocm_smi_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_common.h b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_common.h index fd99fb2f6c..9ed0052a87 100755 --- a/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_common.h +++ b/projects/rocm-smi-lib/include/rocm_smi/rocm_smi_common.h @@ -51,7 +51,7 @@ #include #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) { \