projects
/
blender.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3748ca4
)
Alembic import: prevent crash when cancelling import.
author
Sybren A. Stüvel <sybren@stuvel.eu>
Fri, 7 Apr 2017 14:03:16 +0000
(16:03 +0200)
committer
Sybren A. Stüvel <sybren@stuvel.eu>
Fri, 7 Apr 2017 14:03:29 +0000
(16:03 +0200)
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.
source/blender/alembic/intern/alembic_capi.cc
patch
|
blob
|
history
diff --git
a/source/blender/alembic/intern/alembic_capi.cc
b/source/blender/alembic/intern/alembic_capi.cc
index c16a20899829083d04342294eb1e8f27d95986b1..9529b370928097453677903d50a98b9e736b3ef7 100644
(file)
--- 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);
}