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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-08-02 17:21:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-02 17:21:32 +0400
commitefe690a3a5a53e7857838236159f6b1a41e48bd8 (patch)
treec56a6ab84f159e5ea92f28f6108edfbca3b425b6 /source
parent53024698341690f53ce68f5b11b4c3635df833b5 (diff)
code cleanup:
- incorrect NULL check in logic UI drawing - incorrect NULL check in octree quad test
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_logic/logic_window.c7
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c4
-rw-r--r--source/blender/render/intern/raytrace/rayobject_octree.cpp2
3 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index ce8ee25eef0..2957edd941b 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -1009,8 +1009,6 @@ static void draw_sensor_armature(uiLayout *layout, PointerRNA *ptr)
bSensor *sens = (bSensor *)ptr->data;
bArmatureSensor *as = (bArmatureSensor *) sens->data;
Object *ob = (Object *)ptr->id.data;
- PointerRNA pose_ptr, pchan_ptr;
- PropertyRNA *bones_prop= NULL;
uiLayout *row;
if (ob->type != OB_ARMATURE) {
@@ -1019,11 +1017,12 @@ static void draw_sensor_armature(uiLayout *layout, PointerRNA *ptr)
}
if (ob->pose) {
+ PointerRNA pose_ptr, pchan_ptr;
+ PropertyRNA *bones_prop;
+
RNA_pointer_create((ID *)ob, &RNA_Pose, ob->pose, &pose_ptr);
bones_prop = RNA_struct_find_property(&pose_ptr, "bones");
- }
- if (&pose_ptr.data) {
uiItemPointerR(layout, ptr, "bone", &pose_ptr, "bones", NULL, ICON_BONE_DATA);
if (RNA_property_collection_lookup_string(&pose_ptr, bones_prop, as->posechannel, &pchan_ptr))
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index fb56c5c6dfe..1e4af4304f0 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -683,6 +683,10 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op)
outliner_do_object_operation(C, scene, soops, &soops->tree, item_rename_cb);
str = "Rename Object";
}
+ else {
+ BLI_assert(0);
+ return OPERATOR_CANCELLED;
+ }
ED_undo_push(C, str);
diff --git a/source/blender/render/intern/raytrace/rayobject_octree.cpp b/source/blender/render/intern/raytrace/rayobject_octree.cpp
index e4fd5a6d41e..2f668ba62d0 100644
--- a/source/blender/render/intern/raytrace/rayobject_octree.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_octree.cpp
@@ -521,7 +521,7 @@ static void octree_fill_rayface(Octree *oc, RayFace *face)
copy_v3_v3(co1, face->v1);
copy_v3_v3(co2, face->v2);
copy_v3_v3(co3, face->v3);
- if (face->v4)
+ if (RE_rayface_isQuad(face))
copy_v3_v3(co4, face->v4);
for (c = 0; c < 3; c++) {