Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
f50bb771
Commit
f50bb771
authored
Aug 16, 2006
by
Christian Costa
Committed by
Alexandre Julliard
Aug 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make sure b_info structure is properly allocated and released.
parent
8904529d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
surface.c
dlls/wined3d/surface.c
+6
-1
No files found.
dlls/wined3d/surface.c
View file @
f50bb771
...
...
@@ -1269,6 +1269,9 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) {
break
;
}
if
(
!
b_info
)
return
E_OUTOFMEMORY
;
/* Some apps access the surface in via DWORDs, and do not take the necessary care at the end of the
* surface. So we need at least extra 4 bytes at the end of the surface. Check against the page size,
* if the last page used for the surface has at least 4 spare bytes we're safe, otherwise
...
...
@@ -1347,9 +1350,9 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) {
if
(
!
This
->
dib
.
DIBsection
)
{
ERR
(
"CreateDIBSection failed!
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
b_info
);
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
HeapFree
(
GetProcessHeap
(),
0
,
b_info
);
TRACE
(
"DIBSection at : %p
\n
"
,
This
->
dib
.
bitmap_data
);
...
...
@@ -1363,6 +1366,8 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) {
This
->
Flags
|=
SFLAG_GLDIRTY
;
}
HeapFree
(
GetProcessHeap
(),
0
,
b_info
);
/* Use the dib section from now on */
This
->
resource
.
allocatedMemory
=
This
->
dib
.
bitmap_data
;
...
...
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