[Bf-blender-cvs] [56b3d8d] asset-engine: Fix stupid crash.

Bastien Montagne noreply at git.blender.org
Sat May 2 15:25:52 CEST 2015


Commit: 56b3d8d273a9922d5d24be3b7f1eff9ca907c8f8
Author: Bastien Montagne
Date:   Sat May 2 15:25:35 2015 +0200
Branches: asset-engine
https://developer.blender.org/rB56b3d8d273a9922d5d24be3b7f1eff9ca907c8f8

Fix stupid crash.

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

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

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

diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 9f9b32d..c68fda7 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -861,7 +861,7 @@ static void file_sfile_to_operator(
 
 	selection = filelist_selection_get(sfile->files, check, sfile->params->file, &uuids, !is_fake);
 
-	if (ae && selection->nbr_entries) {
+	if (ae && selection->nbr_entries && !is_fake) {  /* We only expect uuids when not is_fake... */
 		BLI_assert(uuids);
 	}
 
@@ -887,7 +887,7 @@ static void file_sfile_to_operator(
 		if ((prop = RNA_struct_find_property(op->ptr, "filepath"))) {
 			RNA_property_string_set(op->ptr, prop, filepath);
 		}
-		if (ae) {
+		if (ae && uuids) {
 			if ((prop = RNA_struct_find_property(op->ptr, "asset_uuid"))) {
 				RNA_property_int_set_array(op->ptr, prop, uuids->uuids[0].uuid_asset);
 			}




More information about the Bf-blender-cvs mailing list