mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
prevent crash on no dlerror
This commit is contained in:
parent
b8fc586322
commit
180e3f5cd1
@ -116,8 +116,11 @@ void * load_dso(const DSearchPath &path, const Filename &filename)
|
|||||||
|
|
||||||
string
|
string
|
||||||
load_dso_error() {
|
load_dso_error() {
|
||||||
return std::string(dlerror());
|
char *message = dlerror();
|
||||||
//return "No DSO loading yet!";
|
if (message != (char *)NULL) {
|
||||||
|
return std::string(message);
|
||||||
|
}
|
||||||
|
return "No error.";
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@ -142,7 +145,11 @@ unload_dso(void *dso_handle) {
|
|||||||
|
|
||||||
string
|
string
|
||||||
load_dso_error() {
|
load_dso_error() {
|
||||||
return dlerror();
|
char *message = dlerror();
|
||||||
|
if (message != (char *)NULL) {
|
||||||
|
return std::string(message);
|
||||||
|
}
|
||||||
|
return "No error.";
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user