mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
allow set_data() on a null array
This commit is contained in:
parent
9aafee4e4a
commit
2db208431e
@ -567,7 +567,7 @@ INLINE void PointerToArray<Element>::
|
||||
set_subdata(size_type n, size_type count, const string &data) {
|
||||
nassertv((data.length() % sizeof(Element)) == 0);
|
||||
nassertv(n <= size() && n + count <= size());
|
||||
nassertd((this->_void_ptr) != NULL) {
|
||||
if ((this->_void_ptr) == NULL) {
|
||||
((PointerToArray<Element> *)this)->reassign(new ReferenceCountedVector<Element>(_type_handle));
|
||||
}
|
||||
size_type ncount = data.length() / sizeof(Element);
|
||||
|
Loading…
x
Reference in New Issue
Block a user