diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-03-06 18:50:48 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-03-06 18:50:48 +0100 |
| commit | b525b0bdd4528ea19b8323c87f2eb31f45eaf3ab (patch) | |
| tree | db412728a4423523dd94422c43e6a8ada0a56041 /src/librarian | |
| parent | 0a08b7da1aaa4d2f0d1f971e5ed22d1be5bba96c (diff) | |
| download | box64-b525b0bdd4528ea19b8323c87f2eb31f45eaf3ab.tar.gz box64-b525b0bdd4528ea19b8323c87f2eb31f45eaf3ab.zip | |
Fixed a rare case of segfault
Diffstat (limited to 'src/librarian')
| -rwxr-xr-x | src/librarian/librarian.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librarian/librarian.c b/src/librarian/librarian.c index a0419132..e1d4acb9 100755 --- a/src/librarian/librarian.c +++ b/src/librarian/librarian.c @@ -468,6 +468,8 @@ void** my_GetGTKDisplay(); void** my_GetGthreadsGotInitialized(); int GetGlobalSymbolStartEnd(lib_t *maplib, const char* name, uintptr_t* start, uintptr_t* end, elfheader_t* self, int version, const char* vername) { + if(!maplib) + return 0; if(GetGlobalSymbolStartEnd_internal(maplib, name, start, end, self, version, vername)) { if(start && end && *end==*start) { // object is of 0 sized, try to see an "_END" object of null size uintptr_t start2, end2; |