Fix error in recent library API updates
authorCampbell Barton <ideasman42@gmail.com>
Tue, 18 Aug 2015 22:48:38 +0000 (08:48 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 18 Aug 2015 22:49:12 +0000 (08:49 +1000)
source/blender/windowmanager/intern/wm_operators.c

index 6443651949e24c67b9553f80ccce902107ad0e75..15aab9faa004729def18fc6a2eb551b38be3941e 100644 (file)
@@ -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;
        }