[graphics/krita/merge-requests/1179] libs/pigment: Reject opening F16 KRA when the colorspace isn't available

L. E. Segovia null at kde.org
Mon Nov 29 23:58:01 GMT 2021


Git commit aab049f0b3b238d6aa4a6433f11afdb5925d3c0f by L. E. Segovia.
Committed on 29/11/2021 at 23:57.
Pushed by lsegovia into branch 'merge-requests/1179'.

Reject opening F16 KRA when the colorspace isn't available

CCMAIL: kimageshop at kde.org

M  +4    -0    libs/pigment/KoColorSpaceRegistry.cpp

https://invent.kde.org/graphics/krita/commit/aab049f0b3b238d6aa4a6433f11afdb5925d3c0f

diff --git a/libs/pigment/KoColorSpaceRegistry.cpp b/libs/pigment/KoColorSpaceRegistry.cpp
index c1594a5848..b905510d89 100644
--- a/libs/pigment/KoColorSpaceRegistry.cpp
+++ b/libs/pigment/KoColorSpaceRegistry.cpp
@@ -423,6 +423,10 @@ const KoColorSpace *KoColorSpaceRegistry::Private::lazyCreateColorSpaceImpl(cons
     cs = getCachedColorSpaceImpl(csID, profile->name());
     if (!cs) {
         KoColorSpaceFactory *csf = colorSpaceFactoryRegistry.value(csID);
+        if (!csf) {
+            qWarning() << "Unable to create color space factory for" << csID;
+            return 0;
+        }
         cs = csf->grabColorSpace(profile);
         if (!cs) {
             dbgPigmentCSRegistry << "Unable to create color space";


More information about the kimageshop mailing list