Fix crash when trying to reset color space to default value
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 3 Jan 2014 17:11:25 +0000 (23:11 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 3 Jan 2014 17:11:25 +0000 (23:11 +0600)
source/blender/makesrna/intern/rna_color.c

index c430a89655dd0382b81a7a439fe72a3b52b29203..2ae3ca1dfbd9ed074cd06191d8cce3d5e63df17b 100644 (file)
@@ -544,7 +544,7 @@ static void rna_ColorManagedColorspaceSettings_colorspace_set(struct PointerRNA
        ColorManagedColorspaceSettings *colorspace = (ColorManagedColorspaceSettings *) ptr->data;
        const char *name = IMB_colormanagement_colorspace_get_indexed_name(value);
 
-       if (name) {
+       if (name && name[0]) {
                BLI_strncpy(colorspace->name, name, sizeof(colorspace->name));
        }
 }