Skip to content

Commit

Permalink
Merge pull request #246 from KomputeProject/245_null_debug
Browse files Browse the repository at this point in the history
Fix for null debug log causing exception in fmt lib
  • Loading branch information
axsaucedo authored Sep 16, 2021
2 parents 698001b + 3eb97db commit cf94e53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ Manager::createInstance()
};
std::vector<std::string> envLayerNames;
const char* envLayerNamesVal = std::getenv("KOMPUTE_ENV_DEBUG_LAYERS");
KP_LOG_DEBUG("Kompute Manager adding environment layers: {}",
envLayerNamesVal);
if (envLayerNamesVal != NULL && *envLayerNamesVal != '\0') {
KP_LOG_DEBUG("Kompute Manager adding environment layers: {}",
envLayerNamesVal);
std::istringstream iss(envLayerNamesVal);
std::istream_iterator<std::string> beg(iss), end;
envLayerNames = std::vector<std::string>(beg, end);
Expand Down

0 comments on commit cf94e53

Please sign in to comment.