Fixed null pointer check
This commit is contained in:
parent
84eca67498
commit
b907a6e1a6
@ -161,9 +161,8 @@ protected:
|
||||
}
|
||||
|
||||
inline osg::Array* makeVertexBuffer(const osg::Array* array, bool copyUserData=true) {
|
||||
osg::Array* buffer = 0;
|
||||
if(array) {
|
||||
buffer = dynamic_cast<osg::Array*>(array->cloneType());
|
||||
osg::Array* buffer = array ? osg::cloneType(array) : 0;
|
||||
if(buffer) {
|
||||
buffer->setBinding(osg::Array::BIND_PER_VERTEX);
|
||||
if(copyUserData && array->getUserDataContainer()) {
|
||||
buffer->setUserDataContainer(osg::clone(array->getUserDataContainer(), osg::CopyOp::DEEP_COPY_ALL));
|
||||
|
Loading…
Reference in New Issue
Block a user