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.
This commit is contained in:
Sybren A. Stüvel
2017-04-07 16:03:16 +02:00
parent 3748ca432d
commit 43a910abce

View File

@@ -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);
}