Fix T50122: SEGFAULT: OCIO configuration typo leads to segfault

This commit is contained in:
Sergey Sharybin 2016-12-06 14:19:17 +01:00
parent 1de79c8960
commit 1b9cae9d04
Notes: blender-bot 2023-02-14 07:23:24 +01:00
Referenced by issue #50122, SEGFAULT: OCIO configuration typo leads to segfault
1 changed files with 6 additions and 1 deletions

View File

@ -1227,7 +1227,12 @@ const char *IMB_colormanagement_get_float_colorspace(ImBuf *ibuf)
const char *IMB_colormanagement_get_rect_colorspace(ImBuf *ibuf)
{
return ibuf->rect_colorspace->name;
if (ibuf->rect_colorspace) {
return ibuf->rect_colorspace->name;
}
else {
return IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_DEFAULT_BYTE);
}
}
/*********************** Threaded display buffer transform routines *************************/