Revision: 15798
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15798
Author:   aligorith
Date:     2008-07-27 07:20:35 +0200 (Sun, 27 Jul 2008)

Log Message:
-----------
Outliner.c: 

Fixed some warnings about 'ob' being used uninitialsed. In some places that was 
definitely the case! 

Modified Paths:
--------------
    trunk/blender/source/blender/src/outliner.c

Modified: trunk/blender/source/blender/src/outliner.c
===================================================================
--- trunk/blender/source/blender/src/outliner.c 2008-07-27 04:39:55 UTC (rev 
15797)
+++ trunk/blender/source/blender/src/outliner.c 2008-07-27 05:20:35 UTC (rev 
15798)
@@ -3654,7 +3654,7 @@
        uiBut *bt;
        TreeElement *te;
        TreeStoreElem *tselem;
-       Object *ob;
+       Object *ob = NULL;
        
        for(te= lb->first; te; te= te->next) {
                tselem= TREESTORE(te);
@@ -3662,7 +3662,7 @@
                        /* objects have toggle-able restriction flags */
                        if(tselem->type==0 && te->idcode==ID_OB) {
                                ob = (Object *)tselem->id;
-
+                               
                                uiBlockSetEmboss(block, UI_EMBOSSN);
                                bt= uiDefIconButBitS(block, ICONTOG, 
OB_RESTRICT_VIEW, REDRAWALL, ICON_RESTRICT_VIEW_OFF, 
                                                
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, 
&(ob->restrictflag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
@@ -3734,6 +3734,8 @@
                                bPoseChannel *pchan= (bPoseChannel 
*)te->directdata;
                                Bone *bone = pchan->bone;
                                
+                               ob = (Object *)tselem->id;
+                               
                                uiBlockSetEmboss(block, UI_EMBOSSN);
                                bt= uiDefIconButBitI(block, ICONTOG, 
BONE_HIDDEN_P, REDRAWALL, ICON_RESTRICT_VIEW_OFF, 
                                                
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, 
&(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
@@ -3743,6 +3745,8 @@
                        else if(tselem->type==TSE_EBONE)  {
                                EditBone *ebone= (EditBone *)te->directdata;
                                
+                               ob = (Object *)tselem->id;
+                               
                                uiBlockSetEmboss(block, UI_EMBOSSN);
                                bt= uiDefIconButBitI(block, ICONTOG, 
BONE_HIDDEN_A, REDRAWALL, ICON_RESTRICT_VIEW_OFF, 
                                                
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, 
&(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to