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
ec133cea
Commit
ec133cea
authored
Jul 18, 1999
by
Eric Pouech
Committed by
Alexandre Julliard
Jul 18, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check better that handles are actual handles to a region.
parent
9fd10756
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
region.c
objects/region.c
+11
-6
No files found.
objects/region.c
View file @
ec133cea
...
...
@@ -774,7 +774,7 @@ static void REGION_UnionRectWithRegion(const RECT *rect, WINEREGION *rgn)
*/
BOOL
REGION_UnionRectWithRgn
(
HRGN
hrgn
,
const
RECT
*
lpRect
)
{
RGNOBJ
*
obj
=
(
RGNOBJ
*
)
GDI_
HEAP_LOCK
(
hrgn
);
RGNOBJ
*
obj
=
(
RGNOBJ
*
)
GDI_
GetObjPtr
(
hrgn
,
REGION_MAGIC
);
if
(
!
obj
)
return
FALSE
;
REGION_UnionRectWithRegion
(
lpRect
,
obj
->
rgn
);
...
...
@@ -938,6 +938,8 @@ INT WINAPI CombineRgn(HRGN hDest, HRGN hSrc1, HRGN hSrc2, INT mode)
REGION_DumpRegion
(
destObj
->
rgn
);
GDI_HEAP_UNLOCK
(
hDest
);
}
else
{
ERR
(
"Invalid rgn=%04x
\n
"
,
hDest
);
}
return
result
;
}
...
...
@@ -2745,7 +2747,7 @@ empty:
* lpPt: Points to offset the cropped region. Can be NULL (no offset).
*
* hDst: Region to hold the result (a new region is created if it's 0).
* Allowed to be the same region as hSrc in which case every
ht
ing
* Allowed to be the same region as hSrc in which case every
th
ing
* will be done in place, with no memory reallocations.
*
* Returns: hDst if success, 0 otherwise.
...
...
@@ -2773,7 +2775,7 @@ HRGN REGION_CropRgn( HRGN hDst, HRGN hSrc, const RECT *lpRect, const POINT *lpPt
*/
RGNOBJ
*
objSrc
=
(
RGNOBJ
*
)
GDI_
HEAP_LOCK
(
hSrc
);
RGNOBJ
*
objSrc
=
(
RGNOBJ
*
)
GDI_
GetObjPtr
(
hSrc
,
REGION_MAGIC
);
if
(
objSrc
)
{
...
...
@@ -2782,13 +2784,16 @@ HRGN REGION_CropRgn( HRGN hDst, HRGN hSrc, const RECT *lpRect, const POINT *lpPt
if
(
hDst
)
{
objDst
=
(
RGNOBJ
*
)
GDI_HEAP_LOCK
(
hDst
);
if
(
!
(
objDst
=
(
RGNOBJ
*
)
GDI_GetObjPtr
(
hDst
,
REGION_MAGIC
)))
{
hDst
=
0
;
goto
done
;
}
rgnDst
=
objDst
->
rgn
;
}
else
{
rgnDst
=
HeapAlloc
(
SystemHeap
,
0
,
sizeof
(
WINEREGION
));
if
(
rgnDst
)
if
((
rgnDst
=
HeapAlloc
(
SystemHeap
,
0
,
sizeof
(
WINEREGION
))))
{
rgnDst
->
size
=
rgnDst
->
numRects
=
0
;
rgnDst
->
rects
=
NULL
;
/* back end will allocate exact number */
...
...
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