diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2009-09-29 05:31:51 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2009-09-29 05:31:51 +0000 |
| commit | 6bdb8b5059c6d0ebbfb03b19d99a8540b578cee8 (patch) | |
| tree | 171b355d2559c278b970fdf1b0ae9b370aa0c842 /src/color-profile.cpp | |
| parent | Per Johan, a couple build fixes for Win32 cxxtests. (diff) | |
| download | inkscape-6bdb8b5059c6d0ebbfb03b19d99a8540b578cee8.tar.gz inkscape-6bdb8b5059c6d0ebbfb03b19d99a8540b578cee8.zip | |
Avoid crashing when profile is missing. Addresses main symptom of bug #437927.
(bzr r8674)
Diffstat (limited to 'src/color-profile.cpp')
| -rw-r--r-- | src/color-profile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp index 37ebc4f30..9b05aaa7e 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -487,7 +487,7 @@ cmsHPROFILE Inkscape::colorprofile_get_handle( SPDocument* document, guint* inte cmsHTRANSFORM ColorProfile::getTransfToSRGB8() { - if ( !_transf ) { + if ( !_transf && profHandle ) { int intent = getLcmsIntent(rendering_intent); _transf = cmsCreateTransform( profHandle, _getInputFormat(_profileSpace), getSRGBProfile(), TYPE_RGBA_8, intent, 0 ); } @@ -496,7 +496,7 @@ cmsHTRANSFORM ColorProfile::getTransfToSRGB8() cmsHTRANSFORM ColorProfile::getTransfFromSRGB8() { - if ( !_revTransf ) { + if ( !_revTransf && profHandle ) { int intent = getLcmsIntent(rendering_intent); _revTransf = cmsCreateTransform( getSRGBProfile(), TYPE_RGBA_8, profHandle, _getInputFormat(_profileSpace), intent, 0 ); } |
