Skip to content

Commit

Permalink
gapir: Fix crash on gles replay
Browse files Browse the repository at this point in the history
As the documentation for dl_loader states:

// For *nix systems, a nullptr can be used to search the application's functions.
  • Loading branch information
ben-clayton committed Jan 26, 2018
1 parent b465e77 commit 8aa5252
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/cc/dl_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ void* must_load(const char* name) {
#if TARGET_OS == GAPID_OS_WINDOWS
GAPID_FATAL("Can't load library %s: %d", name, GetLastError());
#else
GAPID_FATAL("Can't load library %s: %s", name, dlerror());
if (name != nullptr) {
GAPID_FATAL("Can't load library %s: %s", name, dlerror());
}
#endif // TARGET_OS
}
return res;
Expand Down

0 comments on commit 8aa5252

Please sign in to comment.