Fixed crash on selecting a Custom input color profile
see issue 1298
This commit is contained in:
@@ -453,6 +453,7 @@ DCPProfile* DCPStore::getStdProfile(Glib::ustring camShortName) {
|
||||
}
|
||||
|
||||
bool DCPStore::isValidDCPFileName(Glib::ustring filename) const {
|
||||
return safe_file_test (filename, Glib::FILE_TEST_EXISTS)
|
||||
&& !filename.casefold().compare (filename.find_last_of ('.'), 4, ".dcp");
|
||||
if (!safe_file_test (filename, Glib::FILE_TEST_EXISTS) || safe_file_test (filename, Glib::FILE_TEST_IS_DIR)) return false;
|
||||
int pos=filename.find_last_of ('.');
|
||||
return pos>0 && !filename.casefold().compare (pos, 4, ".dcp");
|
||||
}
|
@@ -283,7 +283,10 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
else if (icameraICC->get_active ())
|
||||
pp->icm.input = "(cameraICC)";
|
||||
else {
|
||||
if (safe_file_test (ipDialog->get_filename (), Glib::FILE_TEST_EXISTS) && !safe_file_test (ipDialog->get_filename (), Glib::FILE_TEST_IS_DIR))
|
||||
pp->icm.input = "file:"+ipDialog->get_filename ();
|
||||
else
|
||||
pp->icm.input = ""; // just a directory
|
||||
|
||||
Glib::ustring p=Glib::path_get_dirname(ipDialog->get_filename ());
|
||||
if (p!=options.rtSettings.iccDirectory) {
|
||||
|
Reference in New Issue
Block a user