Skip to content

Commit

Permalink
glretrace: Replay crashed glXMakeCurrent calls without crashing.
Browse files Browse the repository at this point in the history
Fixes #445
  • Loading branch information
jrfonseca committed Apr 11, 2016
1 parent 52567c3 commit 581249b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions retrace/glretrace_glx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ static void retrace_glXCreateContextAttribsARB(trace::Call &call) {
}

static void retrace_glXMakeCurrent(trace::Call &call) {
bool ret = call.ret->toBool();
if (!ret) {
// If false is returned then any previously current rendering context
if (call.ret && !call.ret->toBool()) {
// If false was returned then any previously current rendering context
// and drawable remain unchanged.
return;
}
Expand Down Expand Up @@ -191,9 +190,8 @@ static void retrace_glXDestroyPbuffer(trace::Call &call) {
}

static void retrace_glXMakeContextCurrent(trace::Call &call) {
bool ret = call.ret->toBool();
if (!ret) {
// If false is returned then any previously current rendering context
if (call.ret && !call.ret->toBool()) {
// If false was returned then any previously current rendering context
// and drawable remain unchanged.
return;
}
Expand Down

0 comments on commit 581249b

Please sign in to comment.