[Bug 27482] Tomb Raider III demo crashes in the launcher

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Jan 20 13:01:18 CST 2012


http://bugs.winehq.org/show_bug.cgi?id=27482

--- Comment #11 from Henri Verbeet <hverbeet at gmail.com> 2012-01-20 13:01:18 CST ---
(In reply to comment #10)
>      if (!iface) return NULL;
> -    assert(iface->lpVtbl == &ddraw_surface7_vtbl);
> -    return CONTAINING_RECORD(iface, IDirectDrawSurfaceImpl, IDirectDrawSurface7_iface);
> +    if (iface->lpVtbl == &ddraw_surface7_vtbl)
> +        return CONTAINING_RECORD(iface, IDirectDrawSurfaceImpl, IDirectDrawSurface7_iface);
> +    if (((IDirectDrawSurface4 *)iface)->lpVtbl == &ddraw_surface4_vtbl)
> +        return CONTAINING_RECORD(iface, IDirectDrawSurfaceImpl, IDirectDrawSurface4_iface);
> +    if (((IDirectDrawSurface3 *)iface)->lpVtbl == &ddraw_surface3_vtbl)
> +        return CONTAINING_RECORD(iface, IDirectDrawSurfaceImpl, IDirectDrawSurface3_iface);
> +    if (((IDirectDrawSurface2 *)iface)->lpVtbl == &ddraw_surface2_vtbl)
> +        return CONTAINING_RECORD(iface, IDirectDrawSurfaceImpl, IDirectDrawSurface2_iface);
> +    if (((IDirectDrawSurface *)iface)->lpVtbl == &ddraw_surface1_vtbl)
> +        return CONTAINING_RECORD(iface, IDirectDrawSurfaceImpl, IDirectDrawSurface_iface);
> +
> +    FIXME("Unknown interface for object at %p.\n", iface);
> +    return NULL;
Although it would still not make me feel particularly happy about all this,
can't you just explicitly QueryInterface() for the IDirectDrawSurface7
interface and then continue as before?

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list