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
446bff78
Commit
446bff78
authored
Oct 18, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Avoid deleting invalid objects.
parent
9351867e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
bitmap.c
dlls/gdi32/tests/bitmap.c
+3
-6
dib.c
dlls/gdi32/tests/dib.c
+1
-1
metafile.c
dlls/gdi32/tests/metafile.c
+0
-1
No files found.
dlls/gdi32/tests/bitmap.c
View file @
446bff78
...
...
@@ -3523,7 +3523,6 @@ static void test_GdiAlphaBlend(void)
HDC
hdcNull
;
HDC
hdcDst
;
HBITMAP
bmpDst
;
HBITMAP
oldDst
;
BITMAPINFO
*
bmi
;
HDC
hdcSrc
;
HBITMAP
bmpSrc
;
...
...
@@ -3553,7 +3552,7 @@ static void test_GdiAlphaBlend(void)
bmpSrc
=
CreateDIBSection
(
hdcDst
,
bmi
,
DIB_RGB_COLORS
,
&
bits
,
NULL
,
0
);
ok
(
bmpSrc
!=
NULL
,
"Couldn't create source bitmap
\n
"
);
oldDst
=
SelectObject
(
hdcDst
,
bmpDst
);
SelectObject
(
hdcDst
,
bmpDst
);
oldSrc
=
SelectObject
(
hdcSrc
,
bmpSrc
);
blend
.
BlendOp
=
AC_SRC_OVER
;
...
...
@@ -3736,12 +3735,10 @@ static void test_GdiAlphaBlend(void)
ok
(
!
ret
,
"GdiAlphaBlend succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"wrong error %u
\n
"
,
GetLastError
()
);
SelectObject
(
hdcDst
,
oldDst
);
SelectObject
(
hdcSrc
,
oldSrc
);
DeleteObject
(
bmpSrc
);
DeleteObject
(
bmpDst
);
DeleteDC
(
hdcDst
);
DeleteDC
(
hdcSrc
);
DeleteObject
(
bmpSrc
);
DeleteObject
(
bmpDst
);
ReleaseDC
(
NULL
,
hdcNull
);
...
...
dlls/gdi32/tests/dib.c
View file @
446bff78
...
...
@@ -1904,6 +1904,7 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits)
DeleteObject
(
bmp
);
SelectObject
(
hdc
,
orig_brush
);
DeleteObject
(
dib_brush
);
SetBrushOrgEx
(
hdc
,
0
,
0
,
NULL
);
SetTextColor
(
hdc
,
old_text
);
SetBkColor
(
hdc
,
old_bkgnd
);
...
...
@@ -2656,7 +2657,6 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits)
SelectObject
(
hdc
,
orig_brush
);
SelectObject
(
hdc
,
orig_pen
);
DeleteObject
(
dib_brush
);
DeleteObject
(
solid_brush
);
DeleteObject
(
wide_pen
);
DeleteObject
(
dashed_pen
);
...
...
dlls/gdi32/tests/metafile.c
View file @
446bff78
...
...
@@ -2489,7 +2489,6 @@ todo_wine
hemf
=
CloseEnhMetaFile
(
hdc
);
DeleteEnhMetaFile
(
hemf
);
DeleteObject
(
hrgn
);
DeleteDC
(
hdc
);
}
static
const
unsigned
char
MF_CLIP_BITS
[]
=
{
...
...
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