* Fixing crash on mingw when entering world buttons
authorJoshua Leung <aligorith@gmail.com>
Tue, 13 Oct 2009 06:15:41 +0000 (06:15 +0000)
committerJoshua Leung <aligorith@gmail.com>
Tue, 13 Oct 2009 06:15:41 +0000 (06:15 +0000)
* 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).

source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_text/space_text.c

index a5a7524e584fe8c80d39359abddfdf395f7d851c..fe437dfd1884a6c7761da3e14a940fb8cb42f4c2 100644 (file)
@@ -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++;
index e3816ed7495bf0e6fb6c6b99fed6b518b9323693..09a5374a43b40d7f45ee9470712dbc6213982512 100644 (file)
@@ -241,7 +241,7 @@ static void text_keymap(struct wmKeyConfig *keyconf)
        if(U.uiflag & USER_MMB_PASTE) // XXX not dynamic
                RNA_boolean_set(WM_keymap_add_item(keymap, "TEXT_OT_paste", MIDDLEMOUSE, KM_PRESS, 0, 0)->ptr, "selection", 1);
 
-       WM_keymap_add_item(keymap, "TEXT_OT_jump", JKEY, KM_PRESS, KM_ALT, 0);
+       WM_keymap_add_item(keymap, "TEXT_OT_jump", GKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "TEXT_OT_find", FKEY, KM_PRESS, KM_CTRL, 0);
        
        WM_keymap_add_item(keymap, "TEXT_OT_properties", FKEY, KM_PRESS, KM_CTRL, 0);