[Bf-blender-cvs] [2770b37] alembic_basic_io: Fix crash dereferencing NULL ptr.

Kévin Dietrich noreply at git.blender.org
Fri Jul 1 14:59:28 CEST 2016


Commit: 2770b37419843e9a4c4bfb1cabbeee88ebef10cf
Author: Kévin Dietrich
Date:   Fri Jul 1 14:49:29 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rB2770b37419843e9a4c4bfb1cabbeee88ebef10cf

Fix crash dereferencing NULL ptr.

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

M	source/blender/alembic/intern/alembic_capi.cc

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

diff --git a/source/blender/alembic/intern/alembic_capi.cc b/source/blender/alembic/intern/alembic_capi.cc
index 15a34db..e4508e3 100644
--- a/source/blender/alembic/intern/alembic_capi.cc
+++ b/source/blender/alembic/intern/alembic_capi.cc
@@ -570,7 +570,9 @@ static void import_endjob(void *user_data)
 		delete *iter;
 	}
 
-	BLI_ghash_free(data->parent_map, NULL, NULL);
+	if (data->parent_map) {
+		BLI_ghash_free(data->parent_map, NULL, NULL);
+	}
 
 	WM_main_add_notifier(NC_SCENE | ND_FRAME, data->scene);
 }
@@ -595,6 +597,7 @@ void ABC_import(bContext *C, const char *filepath, float scale, bool is_sequence
 	job->settings.set_frame_range = set_frame_range;
 	job->settings.sequence_len = sequence_len;
 	job->settings.offset = offset;
+	job->parent_map = NULL;
 
 	G.is_break = false;




More information about the Bf-blender-cvs mailing list