From a2af1d68ae39e52f5e701e8bb2b59dbcfa50dcfb Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 11 Sep 2018 17:08:39 -0400
Subject: [PATCH] P4 to Git Change 1604422 by gandryey@gera-ocl-lc on
2018/09/11 16:51:04
SWDEV-79445 - OCL generic changes and code clean-up
- Don't call backing store destruction for Null programs
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.hpp#25 edit
[ROCm/clr commit: 9bb93126305ec5eb29bbd6d856628017fee4d511]
---
projects/clr/rocclr/runtime/device/pal/palprogram.hpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/projects/clr/rocclr/runtime/device/pal/palprogram.hpp b/projects/clr/rocclr/runtime/device/pal/palprogram.hpp
index fceded4764..dc1db1d3b8 100644
--- a/projects/clr/rocclr/runtime/device/pal/palprogram.hpp
+++ b/projects/clr/rocclr/runtime/device/pal/palprogram.hpp
@@ -223,7 +223,8 @@ class HSAILProgram : public device::Program {
}
//! Destroys CPU allocations in the code segment
- void DestroySegmentCpuAccess() const { codeSegment_->DestroyCpuAccess(); }
+ void DestroySegmentCpuAccess() const
+ { if (!isNull()) { codeSegment_->DestroyCpuAccess(); } }
private:
//! Disable default copy constructor