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
241336c7
Commit
241336c7
authored
Nov 16, 2006
by
Huw Davies
Committed by
Alexandre Julliard
Nov 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: CoRegisterMessageFilter shouldn't crash on an uninitialized apartment.
parent
7c70f7f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
compobj.c
dlls/ole32/compobj.c
+2
-2
compobj.c
dlls/ole32/tests/compobj.c
+3
-2
No files found.
dlls/ole32/compobj.c
View file @
241336c7
...
...
@@ -2671,9 +2671,9 @@ HRESULT WINAPI CoRegisterMessageFilter(
apt
=
COM_CurrentApt
();
/* can't set a message filter in a multi-threaded apartment */
if
(
apt
->
multi_threaded
)
if
(
!
apt
||
apt
->
multi_threaded
)
{
ERR
(
"can't set message filter in MTA
\n
"
);
WARN
(
"can't set message filter in MTA or uninitialized apt
\n
"
);
return
CO_E_NOT_SUPPORTED
;
}
...
...
dlls/ole32/tests/compobj.c
View file @
241336c7
...
...
@@ -250,9 +250,10 @@ static void test_CoRegisterMessageFilter(void)
HRESULT
hr
;
IMessageFilter
*
prev_filter
;
#if 0 /* crashes without an apartment! */
hr
=
CoRegisterMessageFilter
(
&
MessageFilter
,
&
prev_filter
);
#endif
ok
(
hr
==
CO_E_NOT_SUPPORTED
,
"CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08x
\n
"
,
hr
);
pCoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
prev_filter
=
(
IMessageFilter
*
)
0xdeadbeef
;
...
...
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