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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-02 16:07:07 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-02 16:07:07 +0400
commite23e125c3481d86698659f5d11bf5437255f5b97 (patch)
tree5ae465c60faf34a1bfbcf3b49fc0f1e11471358f /source/blender/blenkernel/intern/context.c
parentc2f18383f9637b61dc58cabacf109acb5bcd65f8 (diff)
Fix for revision 36403, using BLI_findstring. This loop looks for the last
found entry, not the first, made this a bit more explicit in the code now.
Diffstat (limited to 'source/blender/blenkernel/intern/context.c')
-rw-r--r--source/blender/blenkernel/intern/context.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index 55d455bc5d3..8929b1aa474 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -451,10 +451,12 @@ static int ctx_data_get(bContext *C, const char *member, bContextDataResult *res
C->data.recursion= 1;
- entry= BLI_findstring(&C->wm.store->entries, member, offsetof(bContextStoreEntry, name));
- if(entry) {
- result->ptr= entry->ptr;
- done= 1;
+ for(entry=C->wm.store->entries.last; entry; entry=entry->prev) {
+ if(strcmp(entry->name, member) == 0) {
+ result->ptr= entry->ptr;
+ done= 1;
+ break;
+ }
}
}
if(done!=1 && recursion < 2 && C->wm.region) {