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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-04-21 08:18:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-04-21 08:18:34 +0300
commitf36e91ad0af2aa6c474f476d0a27fd30f42d45ab (patch)
treeddebddfcd68a8f4847aced85982430314e743c7e /source/blender
parent56a93e9cb12a2269427de1414d191207012b54f4 (diff)
Correct crash in last commit (spacebar search)
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/interface/interface.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index bda74bf5af8..1e738668f9d 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1967,18 +1967,29 @@ static bool ui_but_icon_extra_is_visible_search_unlink(const uiBut *but)
static bool ui_but_icon_extra_is_visible_eyedropper(uiBut *but)
{
- StructRNA *type = RNA_property_pointer_type(&but->rnapoin, but->rnaprop);
- const short idcode = RNA_type_to_ID_code(type);
+ StructRNA *type;
+ short idcode;
BLI_assert(but->type == UI_BTYPE_SEARCH_MENU && (but->flag & UI_BUT_SEARCH_UNLINK));
+ if (but->rnaprop == NULL) {
+ return false;
+ }
+
+ type = RNA_property_pointer_type(&but->rnapoin, but->rnaprop);
+ idcode = RNA_type_to_ID_code(type);
+
+
return ((but->editstr == NULL) &&
(idcode == ID_OB || OB_DATA_SUPPORT_ID(idcode)));
}
uiButExtraIconType ui_but_icon_extra_get(uiBut *but)
{
- if (ui_but_icon_extra_is_visible_search_unlink(but)) {
+ if ((but->flag & UI_BUT_SEARCH_UNLINK) == 0) {
+ /* pass */
+ }
+ else if (ui_but_icon_extra_is_visible_search_unlink(but)) {
return UI_BUT_ICONEXTRA_UNLINK;
}
else if (ui_but_icon_extra_is_visible_eyedropper(but)) {