Fixed crash on selecting a Custom input color profile

see issue 1298
This commit is contained in:
Oliver Duis
2012-04-01 17:18:48 +02:00
parent fa33a880e7
commit 7d621effc7
2 changed files with 6 additions and 2 deletions

View File

@@ -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) {