mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Fix crash on shutdown of buffer in threaded pipeline
This commit is contained in:
parent
546bb22421
commit
bd354a9cde
@ -1626,6 +1626,15 @@ report_my_errors(int line, const char *file) {
|
|||||||
void CLP(GraphicsBuffer)::
|
void CLP(GraphicsBuffer)::
|
||||||
check_host_valid() {
|
check_host_valid() {
|
||||||
if ((_host == 0)||(!_host->is_valid())) {
|
if ((_host == 0)||(!_host->is_valid())) {
|
||||||
|
_rb_data_size_bytes = 0;
|
||||||
|
if (_rb_context != NULL) {
|
||||||
|
// We must delete this object first, because when the GSG
|
||||||
|
// destructs, so will the tracker that this context is
|
||||||
|
// attached to.
|
||||||
|
_rb_context->update_data_size_bytes(0);
|
||||||
|
delete _rb_context;
|
||||||
|
_rb_context = NULL;
|
||||||
|
}
|
||||||
_is_valid = false;
|
_is_valid = false;
|
||||||
_gsg.clear();
|
_gsg.clear();
|
||||||
_host.clear();
|
_host.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user