diff --git a/projects/clr/hipamd/src/hip_texture.cpp b/projects/clr/hipamd/src/hip_texture.cpp index 289bb84f8a..1f7ed22b15 100644 --- a/projects/clr/hipamd/src/hip_texture.cpp +++ b/projects/clr/hipamd/src/hip_texture.cpp @@ -342,7 +342,7 @@ hipError_t ihipDestroyTextureObject(hipTextureObject_t texObject) { const hipResourceType type = texObject->resDesc.resType; const bool isImageFromBuffer = (type == hipResourceTypeLinear) || (type == hipResourceTypePitch2D); const bool isImageView = ((type == hipResourceTypeArray) || (type == hipResourceTypeMipmappedArray)) && - !texObject->image->isParent(); + texObject->image->parent() != nullptr; // If the texture object was created from an array, then the array owns the image SRD. // Otherwise, if the texture object is a view, or was created from a buffer, then it owns the image SRD. if (isImageFromBuffer || isImageView) {