mirror of https://github.com/GNOME/gimp.git
app, libgimpcolor: never return NULL in GimpColorManaged::get_color_profile()
This commit is contained in:
parent
04688e9c93
commit
2e07e938f4
|
@ -1145,7 +1145,8 @@ gimp_display_shell_get_color_profile (GimpColorManaged *managed)
|
|||
if (image)
|
||||
return gimp_color_managed_get_color_profile (GIMP_COLOR_MANAGED (image));
|
||||
|
||||
return NULL;
|
||||
/* never return a NULL profile */
|
||||
return gimp_lcms_create_srgb_profile ();;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -21,11 +21,13 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gio/gio.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "gimpcolortypes.h"
|
||||
|
||||
#include "gimpcolormanaged.h"
|
||||
#include "gimplcms.h"
|
||||
|
||||
|
||||
/**
|
||||
|
@ -132,7 +134,8 @@ gimp_color_managed_get_icc_profile (GimpColorManaged *managed,
|
|||
* gimp_color_managed_get_color_profile:
|
||||
* @managed: an object the implements the #GimpColorManaged interface
|
||||
*
|
||||
* This function, if implemented, always returns a #GimpColorProfile.
|
||||
* This function always returns a #GimpColorProfile and falls back to
|
||||
* gimp_lcms_create_srgb_profile() if the method is not implemented.
|
||||
*
|
||||
* Return value: The @managed's #GimpColorProfile.
|
||||
*
|
||||
|
@ -150,7 +153,8 @@ gimp_color_managed_get_color_profile (GimpColorManaged *managed)
|
|||
if (iface->get_color_profile)
|
||||
return iface->get_color_profile (managed);
|
||||
|
||||
return NULL;
|
||||
/* never return a NULL profile */
|
||||
return gimp_lcms_create_srgb_profile ();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue