diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-08-19 01:48:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-08-19 01:49:12 +0300 |
commit | 6a5303ab43cee91f6990125a8d5b2dbcdeb8eeac (patch) | |
tree | 764197abb205c4c5354b9c55e2edf8279d577754 | |
parent | 1ed1f2f3abd6cdb9134ca3f70c1d504c3fb66c50 (diff) |
Fix error in recent library API updates
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 6443651949e..15aab9faa00 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; } |