On Mon, 4 Mar 2019 at 23:29, Stefan Dösinger stefan@codeweavers.com wrote:
Signed-off-by: Stefan Dösinger stefan@codeweavers.com
dlls/ddraw/clipper.c | 66 +++++++++++++++++++++++++++++++++++--- dlls/ddraw/ddraw_private.h | 1 + 2 files changed, 63 insertions(+), 4 deletions(-)
That's pretty ugly.
Would it work to introduce a helper along the lines of the floowing?
static BOOL ddraw_clipper_is_valid(struct ddraw_clipper *clipper) { return !IsBadReadPtr(clipper, sizeof(*clipper)) && clipper->IDirectDrawClipper_iface.lpVtbl == &ddraw_clipper_vtbl; }