• 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
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
ANNOUNCE.md Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...