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>2018-06-07 19:34:05 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2018-06-07 20:01:45 +0300
commit9a873d0ab2448b0fd059e87f339db07dc648510f (patch)
tree1f1071160ef36a63f30852825460b2d17624fab5 /source/blender/alembic/intern/abc_nurbs.cc
parent5852c66125b706a7ab9e5e179dfa51d3bf94bbd2 (diff)
Alembic import: don't crash Blender when reading invalid samples
Diffstat (limited to 'source/blender/alembic/intern/abc_nurbs.cc')
-rw-r--r--source/blender/alembic/intern/abc_nurbs.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/alembic/intern/abc_nurbs.cc b/source/blender/alembic/intern/abc_nurbs.cc
index 7630e9a0012..95d06fc5efe 100644
--- a/source/blender/alembic/intern/abc_nurbs.cc
+++ b/source/blender/alembic/intern/abc_nurbs.cc
@@ -253,7 +253,19 @@ void AbcNurbsReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSele
nu->resolv = cu->resolv;
const INuPatchSchema &schema = it->first;
- const INuPatchSchema::Sample smp = schema.getValue(sample_sel);
+ INuPatchSchema::Sample smp;
+ try {
+ smp = schema.getValue(sample_sel);
+ }
+ catch(Alembic::Util::Exception &ex) {
+ printf("Alembic: error reading nurbs sample for '%s/%s' at time %f: %s\n",
+ m_iobject.getFullName().c_str(),
+ schema.getName().c_str(),
+ sample_sel.getRequestedTime(),
+ ex.what());
+ return;
+ }
+
nu->orderu = smp.getUOrder() - 1;
nu->orderv = smp.getVOrder() - 1;