fix [#27072] Calling bpy.utils.blend_paths(True) results in segmantaion fault since...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 20 Apr 2011 12:55:42 +0000 (12:55 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 20 Apr 2011 12:55:42 +0000 (12:55 +0000)
source/blender/python/intern/bpy.c

index c10340f6ff90a50a8c4bfe89c56ac158868d5a1a..7a7fd2b23b6c5794b5827263b36f8b7db1856bf0 100644 (file)
@@ -46,7 +46,7 @@
 #include "BLI_bpath.h"
 #include "BLI_utildefines.h"
 
-
+#include "BKE_main.h"
 #include "BKE_global.h" /* XXX, G.main only */
 #include "BKE_blender.h"
 
@@ -111,7 +111,7 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
 
        list= PyList_New(0);
 
-       for(BLI_bpathIterator_init(&bpi, G.main, NULL, 0); !BLI_bpathIterator_isDone(bpi); BLI_bpathIterator_step(bpi)) {
+       for(BLI_bpathIterator_init(&bpi, G.main, G.main->name, 0); !BLI_bpathIterator_isDone(bpi); BLI_bpathIterator_step(bpi)) {
                /* build the list */
                if (absolute) {
                        BLI_bpathIterator_getPathExpanded(bpi, filepath_expanded);