[Bf-blender-cvs] [6a5303a] master: Fix error in recent library API updates

Campbell Barton noreply at git.blender.org
Wed Aug 19 00:56:23 CEST 2015


Commit: 6a5303ab43cee91f6990125a8d5b2dbcdeb8eeac
Author: Campbell Barton
Date:   Wed Aug 19 08:48:38 2015 +1000
Branches: master
https://developer.blender.org/rB6a5303ab43cee91f6990125a8d5b2dbcdeb8eeac

Fix error in recent library API updates

===================================================================

M	source/blender/windowmanager/intern/wm_operators.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 6443651..15aab9f 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2602,7 +2602,8 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
 	BlendHandle *bh;
 	Library *lib;
 	PropertyRNA *prop;
-	char name[FILE_MAX], dir[FILE_MAX], libname[FILE_MAX], group[BLO_GROUP_MAX];
+	char name[FILE_MAX], dir[FILE_MAX], libname[FILE_MAX];
+	char *group;
 	int idcode, totfiles = 0;
 	short flag;
 
@@ -2610,11 +2611,11 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
 	RNA_string_get(op->ptr, "directory", dir);
 
 	/* test if we have a valid data */
-	if (BLO_library_path_explode(dir, libname, group, NULL) == 0) {
+	if (BLO_library_path_explode(dir, libname, &group, NULL) == 0) {
 		BKE_report(op->reports, RPT_ERROR, "Not a library");
 		return OPERATOR_CANCELLED;
 	}
-	else if (group[0] == 0) {
+	else if ((group == NULL) || (group[0] == '\0')) {
 		BKE_report(op->reports, RPT_ERROR, "Nothing indicated");
 		return OPERATOR_CANCELLED;
 	}




More information about the Bf-blender-cvs mailing list