Commit e4edac18 authored by Cyrille Berger Skott's avatar Cyrille Berger Skott
Browse files

Fix: crash when opening files that have a profile that is not compatible with their color space

BUG:264837
parent 80f4b3bc
......@@ -185,7 +185,6 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KUrl& uri)
KoColorSpaceRegistry::instance()->colorSpaceId(
modelId, Integer8BitsColorDepthID.id()))->profileIsCompatible(profile)) {
warnFile << "The profile " << profile->name() << " is not compatible with the color space model " << modelId;
delete profile;
profile = 0;
}
......
......@@ -258,11 +258,11 @@ KisImageBuilder_Result KisTIFFConverter::readTIFFDirectory(TIFF* image)
}
// Check that the profile is used by the color space
if (profile && !KoColorSpaceRegistry::instance()->colorSpaceFactory(
KoColorSpaceRegistry::instance()->colorSpaceId(
colorSpaceId.first, colorSpaceId.second))->profileIsCompatible(profile)) {
warnFile << "The profile " << profile->name() << " is not compatible with the color space model " << colorSpaceId.first << " " << colorSpaceId.second;
delete profile;
profile = 0;
}
......
......@@ -527,7 +527,6 @@ KisImageBuilder_Result KisPNGConverter::buildImage(QIODevice* iod)
KoColorSpaceRegistry::instance()->colorSpaceId(
csName.first, csName.second))->profileIsCompatible(profile)) {
warnFile << "The profile " << profile->name() << " is not compatible with the color space model " << csName.first << " " << csName.second;
delete profile;
profile = 0;
}
......
Supports Markdown
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