Fix to make plugins work on windows (last system error code for
the thread wasn't getting reset). Somebody with more windows saavy might want to check that this doesn't break other stuff.
This commit is contained in:
@@ -67,8 +67,15 @@ void *PIL_dynlib_find_symbol(PILdynlib* lib, char *symname) {
|
||||
}
|
||||
|
||||
char *PIL_dynlib_get_error_as_string(PILdynlib* lib) {
|
||||
int err= GetLastError();
|
||||
int err;
|
||||
|
||||
/* if lib is NULL reset the last error code */
|
||||
if (!lib) {
|
||||
SetLastError(ERROR_SUCCESS);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
err= GetLastError();
|
||||
if (err) {
|
||||
static char buf[1024];
|
||||
|
||||
|
Reference in New Issue
Block a user