Andreas Mohr a.mohr@mailto.de writes:
objects/gdiobj.c really has no business dealing with SetLastError(). SetLastError() is a mechanism to communicate errors to external programs, so it should definitely not be used for highly internal functions.
You didn't include the gdiobj.c patch, but I disagree with it anyway... There can be many good reasons for setting last error in internal functions; for instance setting it inside GDI_GetObjPtr avoids having to set it in every single caller. And in the very rare case where this is not what we want, the caller can always set it to another value.