From 3c256eb9e417b01163be2fa1eda42f51b657dfd3 Mon Sep 17 00:00:00 2001 From: Andrea Weikert Date: Sun, 1 Apr 2007 19:00:10 +0000 Subject: [PATCH] ==== bugfix ==== small fix for uninitialized variable curlib --- source/blender/blenloader/intern/readfile.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4968de44120..4f00cf1626d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7289,7 +7289,7 @@ static void append_id_part(FileData *fd, Main *mainvar, ID *id, ID **id_r) /* common routine to append/link something from a library */ -static void library_append( Scene *scene, SpaceFile *sfile, char *dir, int idcode, +static Library* library_append( Scene *scene, SpaceFile *sfile, char *dir, int idcode, int totsel, FileData *fd) { Main *mainl; @@ -7352,7 +7352,9 @@ static void library_append( Scene *scene, SpaceFile *sfile, char *dir, int idcod if(fd->flags & FD_FLAGS_SWITCH_ENDIAN) { blo_freefiledata( fd ); sfile->libfiledata= 0; - } + } + + return curlib; } /* this is a version of BLO_library_append needed by the BPython API, so @@ -7415,7 +7417,7 @@ void BLO_library_append(SpaceFile *sfile, char *dir, int idcode) if(sfile->flag & FILE_AUTOSELECT) scene_deselect_all(G.scene); - library_append( G.scene, sfile, dir, idcode, totsel, fd ); + curlib = library_append( G.scene, sfile, dir, idcode, totsel, fd ); /* when not linking (appending)... */ if((sfile->flag & FILE_LINK)==0) {