• Andrew Nguyen's avatar
    ddraw: Release only valid texture parents on ddraw_texture_init failure. · 1600f2e6
    Andrew Nguyen authored
    When ddraw_texture_init needs to clean up on failure, it will call the
    wined3d_texture_get_sub_resource_parent function on draw_texture in
    order to retrieve its parent for a IDirectDrawSurface release call.
    However, if draw_texture is NULL, then the function call will crash
    due to a null pointer dereference.
    
    Therefore, on failure cleanup, the release operation on the texture
    parent should only be performed if draw_texture is not NULL.
    
    This fixes a crash in the Virtual Insanity game demo.
    1600f2e6
Name
Last commit
Last update
..
tests Loading commit data...
Makefile.in Loading commit data...
clipper.c Loading commit data...
ddraw.c Loading commit data...
ddraw.spec Loading commit data...
ddraw_classes.idl Loading commit data...
ddraw_private.h Loading commit data...
device.c Loading commit data...
executebuffer.c Loading commit data...
light.c Loading commit data...
main.c Loading commit data...
material.c Loading commit data...
palette.c Loading commit data...
surface.c Loading commit data...
utils.c Loading commit data...
version.rc Loading commit data...
vertexbuffer.c Loading commit data...
viewport.c Loading commit data...