Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-07-12 11:15:32 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-07-12 11:15:32 +0400
commit54c5edcfbb3547d88079e4c4fa6bfc8d7610db3c (patch)
treeb0c39908d6a9283317ef644c76a4c111bbb2623c /source
parent677876e4294708784eceb47bfc73698673a6e910 (diff)
Fix crash on creating tooltip for sequencer's gl preview mode
Issue was caused by missed value for this enum, fixed by adding check in tooltip generation. Default value for this enum should also be fixed, but that would be in separated commit.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 381560fc9ac..60f071f2ad2 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3792,12 +3792,14 @@ void uiButGetStrInfo(bContext *C, uiBut *but, int nbr, ...)
break;
}
}
- if (type == BUT_GET_RNAENUM_IDENTIFIER)
- tmp = BLI_strdup(item->identifier);
- else if (type == BUT_GET_RNAENUM_LABEL)
- tmp = BLI_strdup(item->name);
- else if (item->description && item->description[0])
- tmp = BLI_strdup(item->description);
+ if (item && item->identifier) {
+ if (type == BUT_GET_RNAENUM_IDENTIFIER)
+ tmp = BLI_strdup(item->identifier);
+ else if (type == BUT_GET_RNAENUM_LABEL)
+ tmp = BLI_strdup(item->name);
+ else if (item->description && item->description[0])
+ tmp = BLI_strdup(item->description);
+ }
}
}
else if (type == BUT_GET_OP_KEYMAP) {