Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2caa797e
Commit
2caa797e
authored
Apr 03, 2008
by
Alexander Dorofeyev
Committed by
Alexandre Julliard
Apr 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Set surface to NULL on failure in GetAttachedSurface.
parent
9183b472
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
surface.c
dlls/ddraw/surface.c
+2
-0
surface_thunks.c
dlls/ddraw/surface_thunks.c
+2
-3
dsurface.c
dlls/ddraw/tests/dsurface.c
+4
-0
No files found.
dlls/ddraw/surface.c
View file @
2caa797e
...
...
@@ -540,6 +540,8 @@ IDirectDrawSurfaceImpl_GetAttachedSurface(IDirectDrawSurface7 *iface,
TRACE
(
"(%p) Didn't find a valid surface
\n
"
,
This
);
LeaveCriticalSection
(
&
ddraw_cs
);
*
Surface
=
NULL
;
return
DDERR_NOTFOUND
;
}
...
...
dlls/ddraw/surface_thunks.c
View file @
2caa797e
...
...
@@ -228,9 +228,8 @@ IDirectDrawSurface3Impl_GetAttachedSurface(LPDIRECTDRAWSURFACE3 This,
hr
=
IDirectDrawSurface7_GetAttachedSurface
(
CONVERT
(
This
),
&
caps
,
&
pAttached7
);
if
(
FAILED
(
hr
))
return
hr
;
*
ppAttached
=
CONVERT_REV
(
pAttached7
);
if
(
FAILED
(
hr
))
*
ppAttached
=
NULL
;
else
*
ppAttached
=
CONVERT_REV
(
pAttached7
);
return
hr
;
}
...
...
dlls/ddraw/tests/dsurface.c
View file @
2caa797e
...
...
@@ -1012,6 +1012,7 @@ static void EnumTest(void)
ok
(
rc
==
DD_OK
,
"GetAttachedSurface returned %08x
\n
"
,
rc
);
rc
=
IDirectDrawSurface_GetAttachedSurface
(
ctx
.
expected
[
2
],
&
ddsd
.
ddsCaps
,
&
ctx
.
expected
[
3
]);
ok
(
rc
==
DDERR_NOTFOUND
,
"GetAttachedSurface returned %08x
\n
"
,
rc
);
ok
(
!
ctx
.
expected
[
3
],
"expected NULL pointer
\n
"
);
ctx
.
count
=
0
;
rc
=
IDirectDraw_EnumSurfaces
(
lpDD
,
DDENUMSURFACES_DOESEXIST
|
DDENUMSURFACES_ALL
,
&
ddsd
,
(
void
*
)
&
ctx
,
enumCB
);
...
...
@@ -1077,6 +1078,9 @@ static void AttachmentTest7(void)
ok
(
num
==
0
,
"Second mip level has %d surfaces attached, expected 1
\n
"
,
num
);
/* Done level 2 */
/* Mip level 3 is still needed */
hr
=
IDirectDrawSurface7_GetAttachedSurface
(
surface3
,
&
caps
,
&
surface4
);
ok
(
hr
==
DDERR_NOTFOUND
,
"GetAttachedSurface returned %08x
\n
"
,
hr
);
ok
(
!
surface4
,
"expected NULL pointer
\n
"
);
/* Try to attach a 16x16 miplevel - Should not work as far I can see */
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment