Python API
authorKen Hughes <khughes@pacific.edu>
Sun, 14 Sep 2008 14:17:44 +0000 (14:17 +0000)
committerKen Hughes <khughes@pacific.edu>
Sun, 14 Sep 2008 14:17:44 +0000 (14:17 +0000)
----------
Fix C90 mixed declarations and code.

source/blender/python/api2_2x/bpy_data.c

index b625f60e2da846930c823391757e5826c089b278..47232c6707a50e55b62e807fba1f8602b31487be 100644 (file)
@@ -334,6 +334,7 @@ static int LibBlockSeq_setActive(BPy_LibBlockSeq *self, PyObject *value)
                                        "Must be a text" );
                } else {
                        SpaceText *st= NULL;
                                        "Must be a text" );
                } else {
                        SpaceText *st= NULL;
+                       Text *data = ((BPy_Text *)value)->text;
                        
                        if (curarea==NULL) {
                                return 0;
                        
                        if (curarea==NULL) {
                                return 0;
@@ -341,8 +342,6 @@ static int LibBlockSeq_setActive(BPy_LibBlockSeq *self, PyObject *value)
                                st= curarea->spacedata.first;
                        }
                        
                                st= curarea->spacedata.first;
                        }
                        
-                       Text *data = ((BPy_Text *)value)->text;
-                       
                        if( !data )
                                return EXPP_ReturnIntError( PyExc_RuntimeError,
                                                      "This object isn't linked to a Blender Text Object" );
                        if( !data )
                                return EXPP_ReturnIntError( PyExc_RuntimeError,
                                                      "This object isn't linked to a Blender Text Object" );