[Bf-blender-cvs] [f3b9f0c] alembic_pointcache: Extra check for cache user info when running the generic point cache export operator.

Lukas Tönne noreply at git.blender.org
Fri Oct 17 11:14:48 CEST 2014


Commit: f3b9f0c6194d6068e2b5e0deeadb0726d963a200
Author: Lukas Tönne
Date:   Thu Oct 16 18:39:05 2014 +0200
Branches: alembic_pointcache
https://developer.blender.org/rBf3b9f0c6194d6068e2b5e0deeadb0726d963a200

Extra check for cache user info when running the generic point cache
export operator.

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

M	source/blender/editors/physics/physics_pointcache.c

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

diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index 5c7a27a..25a1c68 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -143,6 +143,10 @@ static int ptcache_export_exec(bContext *C, wmOperator *op)
 	PTCacheExportJob *data;
 	wmJob *wm_job;
 	
+	if (!user_ptr.data) {
+		BKE_reportf(op->reports, RPT_ERROR_INVALID_INPUT, "Missing point cache user info");
+		return OPERATOR_CANCELLED;
+	}
 	writer = PTC_writer_from_rna(scene, &user_ptr);
 	if (!writer) {
 		BKE_reportf(op->reports, RPT_ERROR_INVALID_INPUT, "%s is not a valid point cache user type", RNA_struct_identifier(user_ptr.type));




More information about the Bf-blender-cvs mailing list