2.5/Sculpt:
[blender.git] / source / blender / editors / screen / screen_context.c
index 3842dd3d62f796a32779d48598f77d3afdcea5d1..ba91502dcbbf649d5cd092ee853a863122a47c9d 100644 (file)
@@ -112,7 +112,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
                return 1;
        }
        else if(CTX_data_equals(member, "sculpt_object")) {
-               if(G.f & G_SCULPTMODE && scene->basact)
+               if(scene->basact && (scene->basact->object->mode & OB_MODE_SCULPT))
                        CTX_data_id_pointer_set(result, &scene->basact->object->id);
 
                return 1;