check for This->clipper before unreferencing in dlls/ddraw/surface.c

Vincent Fourmond vincent.fourmond at
Sat May 12 15:00:36 CDT 2007

Hash: SHA1

Stefan Dösinger wrote:
> Am Samstag 12 Mai 2007 15:00 schrieb Vincent Fourmond:
>> (IDirectDrawSurfaceImpl_SetClipper): fixes segfault at HMMIV startup.
>> ---
>>  ChangeLog            |    6 ++++++
>>  dlls/ddraw/surface.c |    5 +++--
>>  2 files changed, 9 insertions(+), 2 deletions(-)
> Now that wined3d stores the clipper, the surface->clipper member should be 
> removed and GetClipper and SetClipper should use wined3dsurface::getclipper 
> and Setclipper(like setpalette and getpalette does). 

  I don't really understand what that means: it seems that all of
surface.c is using the This->clipper idiom to access to the clipper. I
just did add a sanity check to ensure it doesn't get unreferenced when
NULL. If there is a transition here to be done however, I'm willing to
help (once I understand better the whole scheme).

> also you do not have to 
> modify the ChangeLog file, git does that automatically when AJ commits the 
> patch.

  I just followed the instructions on If they are not correct, please
update this page.

> Also please stick to the formating of the rest of the file / function. Here 
> you used tabs instead of spaces for indention.

  Sorry, I'm not used to paying attention to this kind of conventions;
I'll look better next time.


	Vincent Fourmond
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


More information about the wine-devel mailing list