mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
try fix segfault (sorry!)
This commit is contained in:
parent
126573775a
commit
56334e73e8
@ -550,10 +550,19 @@ operator = (const Attribute ©) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE int RenderState::Attribute::
|
INLINE int RenderState::Attribute::
|
||||||
compare_to(const Attribute &other) const {
|
compare_to(const Attribute &other) const {
|
||||||
int c = _attrib->compare_to(*other._attrib);
|
if (_attrib != other._attrib) {
|
||||||
if (c != 0) {
|
if (_attrib == NULL) {
|
||||||
return c;
|
return -1;
|
||||||
|
} else if (other._attrib == NULL) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int c = _attrib->compare_to(*other._attrib);
|
||||||
|
if (c != 0) {
|
||||||
|
return c;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return _override - other._override;
|
return _override - other._override;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user