diff --git a/hipamd/api/hip/hip_platform.cpp b/hipamd/api/hip/hip_platform.cpp index c4c2e7d1cb..da7f8beb62 100644 --- a/hipamd/api/hip/hip_platform.cpp +++ b/hipamd/api/hip/hip_platform.cpp @@ -445,6 +445,9 @@ const std::vector& modules() { nullptr); for (auto&& bundle : bundles) { + if (bundle.empty()) { + continue; + } std::string magic(&bundle[0], sizeof(CLANG_OFFLOAD_BUNDLER_MAGIC_STR) - 1); if (magic.compare(CLANG_OFFLOAD_BUNDLER_MAGIC_STR)) continue;