From 2c906460cbe60beacbd0e4af9f46ec57d511f410 Mon Sep 17 00:00:00 2001 From: pghafari Date: Mon, 26 Dec 2022 00:41:30 -0500 Subject: [PATCH] SWDEV-369580 - hipModuleGetTexRef matching cuda Change-Id: I3f071fe0b289c0ba8316c691f066f47d12b156b5 --- hipamd/src/hip_module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hipamd/src/hip_module.cpp b/hipamd/src/hip_module.cpp index b9cfd83d2f..bb400ad1b5 100644 --- a/hipamd/src/hip_module.cpp +++ b/hipamd/src/hip_module.cpp @@ -682,7 +682,7 @@ hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const HIP_INIT_API(hipModuleGetTexRef, texRef, hmod, name); /* input args check */ - if ((texRef == nullptr) || (name == nullptr)) { + if ((texRef == nullptr) || (name == nullptr) || (strlen(name) == 0)) { HIP_RETURN(hipErrorInvalidValue); } if (hmod == nullptr) {