File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -535,6 +535,7 @@ class SceneCache::ReaderImplementation : public SceneCache::Implementation
535
535
}
536
536
if ( !it.first ->second )
537
537
{
538
+ m_attributeSampleTimes.erase ( it.first );
538
539
throw Exception ( ( boost::format ( " No samples for attribute %s available" ) % name.value () ).str () );
539
540
}
540
541
return *(it.first ->second );
Original file line number Diff line number Diff line change @@ -112,6 +112,16 @@ struct SceneCacheThreadingTest
112
112
parallel_reduce ( blocked_range<size_t >( 0 , 100 ), task );
113
113
BOOST_CHECK ( task.errors () == 0 );
114
114
}
115
+
116
+ void testFakeAttributeRead ()
117
+ {
118
+ task_scheduler_init scheduler ( 100 );
119
+
120
+ TestSceneCache task ( " fake" );
121
+
122
+ parallel_reduce ( blocked_range<size_t >( 0 , 100 ), task );
123
+ BOOST_CHECK ( task.errors () == 100000 );
124
+ }
115
125
116
126
};
117
127
@@ -123,6 +133,7 @@ struct SceneCacheThreadingTestSuite : public boost::unit_test::test_suite
123
133
boost::shared_ptr<SceneCacheThreadingTest> instance ( new SceneCacheThreadingTest () );
124
134
125
135
add ( BOOST_CLASS_TEST_CASE ( &SceneCacheThreadingTest::testAttributeRead, instance ) );
136
+ add ( BOOST_CLASS_TEST_CASE ( &SceneCacheThreadingTest::testFakeAttributeRead, instance ) );
126
137
}
127
138
};
128
139
You can’t perform that action at this time.
0 commit comments