From 7e3d044bdd398c712bd65094b0f1d444580e8011 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 20 Apr 2011 12:55:42 +0000 Subject: [PATCH] fix [#27072] Calling bpy.utils.blend_paths(True) results in segmantaion fault since 2.56 --- source/blender/python/intern/bpy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index c10340f6ff9..7a7fd2b23b6 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -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);