diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-10-13 10:15:41 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-10-13 10:15:41 +0400 |
commit | 4b593ce328e4832cb69f56669239573eb72cf862 (patch) | |
tree | 14c3e13d9ea097f5e8bd793f520d8b98222a27e9 /source/blender/editors/space_buttons/buttons_context.c | |
parent | f8ab477f4569dec1853ec7c9114d21f9a84a062f (diff) |
* Fixing crash on mingw when entering world buttons
* Changing hotkey in text editor for 'jumping' to a particular line to Ctrl-G, since this appears to be more standard (and is easier to hit).
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_context.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index a5a7524e584..fe437dfd188 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -117,6 +117,7 @@ static int buttons_context_path_scene(ButsContextPath *path) static int buttons_context_path_world(ButsContextPath *path) { Scene *scene; + World *world; PointerRNA *ptr= &path->ptr[path->len-1]; /* if we already have a (pinned) world, we're done */ @@ -126,11 +127,14 @@ static int buttons_context_path_world(ButsContextPath *path) /* if we have a scene, use the scene's world */ else if(buttons_context_path_scene(path)) { scene= path->ptr[path->len-1].data; + world= scene->world; + + if(world) { + RNA_id_pointer_create(&scene->world->id, &path->ptr[path->len]); + path->len++; - RNA_id_pointer_create(&scene->world->id, &path->ptr[path->len]); - path->len++; - - return 1; + return 1; + } } /* no path to a world possible */ @@ -367,7 +371,7 @@ static int buttons_context_path_texture(const bContext *C, ButsContextPath *path wo= path->ptr[path->len-1].data; if(wo) { - give_current_world_texture(wo); + tex= give_current_world_texture(wo); RNA_id_pointer_create(&tex->id, &path->ptr[path->len]); path->len++; |