Fix crash when trying to load DCP (#7039)

Stream a C-string of the file name instead of the Glib::ustring. The
ustring can throw an exception with certain locale settings and file
name character combinations, such as with LANG=es_ES and the character
"ä".
Only print the message if verbose is true.
This commit is contained in:
Lawrence37
2024-05-27 11:13:09 -07:00
committed by GitHub
parent c74bcad19e
commit 71f452aa12

View File

@@ -1177,7 +1177,9 @@ DCPProfile::DCPProfile(const Glib::ustring& filename) :
// Color Matrix (one is always there)
if (!md.find(TAG_KEY_COLOR_MATRIX_1)) {
std::cerr << "DCP '" << filename << "' is missing 'ColorMatrix1'. Skipped." << std::endl;
if (settings->verbose) {
std::cerr << "DCP '" << filename.c_str() << "' is missing 'ColorMatrix1'. Skipped." << std::endl;
}
return;
}