[Bf-blender-cvs] [dbd37b2] master: Suppress assert in debug mode.

Campbell Barton noreply at git.blender.org
Mon Feb 17 10:16:32 CET 2014


Commit: dbd37b21bd5e87533b690e459a130d096972ffb3
Author: Campbell Barton
Date:   Mon Feb 17 20:15:33 2014 +1100
https://developer.blender.org/rBdbd37b21bd5e87533b690e459a130d096972ffb3

Suppress assert in debug mode.

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

M	source/blender/editors/space_file/filelist.c

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

diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 6ea5638..a7995dd 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1033,7 +1033,7 @@ bool filelist_islibrary(struct FileList *filelist, char *dir, char *group)
 
 static int groupname_to_code(const char *group)
 {
-	char buf[32];
+	char buf[BLO_GROUP_MAX];
 	char *lslash;
 	
 	BLI_strncpy(buf, group, sizeof(buf));
@@ -1041,7 +1041,7 @@ static int groupname_to_code(const char *group)
 	if (lslash)
 		lslash[0] = '\0';
 
-	return BKE_idcode_from_name(buf);
+	return buf[0] ? BKE_idcode_from_name(buf) : 0;
 }
  
 void filelist_from_library(struct FileList *filelist)




More information about the Bf-blender-cvs mailing list