Skip to content

Commit 4206e34

Browse files
committed
Fix obscure GL crash
1 parent e8e155f commit 4206e34

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

panda/src/glstuff/glGraphicsBuffer_src.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ begin_frame(FrameMode mode, Thread *current_thread) {
155155
for (it = _texture_contexts.begin(); it != _texture_contexts.end(); ++it) {
156156
CLP(TextureContext) *gtc = *it;
157157

158-
if (gtc->needs_barrier(GL_FRAMEBUFFER_BARRIER_BIT)) {
158+
if (gtc != NULL && gtc->needs_barrier(GL_FRAMEBUFFER_BARRIER_BIT)) {
159159
glgsg->issue_memory_barrier(GL_FRAMEBUFFER_BARRIER_BIT);
160160
// If we've done it for one, we've done it for all.
161161
break;
@@ -1656,7 +1656,7 @@ resolve_multisamples() {
16561656
for (it = _texture_contexts.begin(); it != _texture_contexts.end(); ++it) {
16571657
CLP(TextureContext) *gtc = *it;
16581658

1659-
if (gtc->needs_barrier(GL_FRAMEBUFFER_BARRIER_BIT)) {
1659+
if (gtc != NULL && gtc->needs_barrier(GL_FRAMEBUFFER_BARRIER_BIT)) {
16601660
glgsg->issue_memory_barrier(GL_FRAMEBUFFER_BARRIER_BIT);
16611661
// If we've done it for one, we've done it for all.
16621662
break;

panda/src/glstuff/glGraphicsStateGuardian_src.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7045,6 +7045,9 @@ report_extensions() const {
70457045
out.put(' ');
70467046
}
70477047
out << ' ' << (*ei);
7048+
} else {
7049+
out.put('\n');
7050+
break;
70487051
}
70497052
}
70507053
out.put('\n');

0 commit comments

Comments
 (0)