Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2017-04-07 17:03:16 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2017-04-07 17:03:29 +0300
commit43a910abce50963d12c0ccde596347459d921b9a (patch)
tree9d4d2ddcd87c7c34b88caee325766d5a5803e76f /source/blender/alembic
parent3748ca432d2d91b9e1d90774726a0fcf07d288bf (diff)
Alembic import: prevent crash when cancelling import.
It's possible that cancellation occured between the creation of the reader and the creation of the Blender object, in which case reader->object() returns a NULL pointer.
Diffstat (limited to 'source/blender/alembic')
-rw-r--r--source/blender/alembic/intern/alembic_capi.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/alembic/intern/alembic_capi.cc b/source/blender/alembic/intern/alembic_capi.cc
index c16a2089982..9529b370928 100644
--- a/source/blender/alembic/intern/alembic_capi.cc
+++ b/source/blender/alembic/intern/alembic_capi.cc
@@ -766,6 +766,9 @@ static void import_endjob(void *user_data)
for (iter = data->readers.begin(); iter != data->readers.end(); ++iter) {
Object *ob = (*iter)->object();
+ /* It's possible that cancellation occured between the creation of
+ * the reader and the creation of the Blender object. */
+ if (ob == NULL) continue;
BKE_libblock_free_us(data->bmain, ob);
}