Commit 9fb8f634 authored by Alexander Alekhin's avatar Alexander Alekhin Committed by Alexander Alekhin

core: don't call std::string(NULL)

parent 7f73b105
......@@ -1655,12 +1655,7 @@ cv::String utils::getConfigurationParameterString(const char* name, const char*
#else
const char* envValue = getenv(name);
#endif
if (envValue == NULL)
{
return defaultValue;
}
cv::String value = envValue;
return value;
return envValue ? cv::String(envValue) : (defaultValue ? cv::String(defaultValue) : cv::String());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment