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
c481fb4b
Commit
c481fb4b
authored
Nov 14, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Correctly handle NULL nsdoc in IHTMLDocument2::get_body.
parent
22ba44b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
htmldoc.c
dlls/mshtml/htmldoc.c
+7
-9
dom.c
dlls/mshtml/tests/dom.c
+6
-1
No files found.
dlls/mshtml/htmldoc.c
View file @
c481fb4b
...
...
@@ -140,19 +140,17 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement
HTMLDocument
*
This
=
HTMLDOC_THIS
(
iface
);
nsIDOMHTMLElement
*
nsbody
=
NULL
;
HTMLDOMNode
*
node
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
doc_node
->
nsdoc
)
{
WARN
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
}
if
(
This
->
doc_node
->
nsdoc
)
{
nsresult
nsres
;
nsres
=
nsIDOMHTMLDocument_GetBody
(
This
->
doc_node
->
nsdoc
,
&
nsbody
);
if
(
NS_FAILED
(
nsres
))
{
TRACE
(
"Could not get body: %08x
\n
"
,
nsres
);
return
E_UNEXPECTED
;
nsres
=
nsIDOMHTMLDocument_GetBody
(
This
->
doc_node
->
nsdoc
,
&
nsbody
);
if
(
NS_FAILED
(
nsres
))
{
TRACE
(
"Could not get body: %08x
\n
"
,
nsres
);
return
E_UNEXPECTED
;
}
}
if
(
nsbody
)
{
...
...
dlls/mshtml/tests/dom.c
View file @
c481fb4b
...
...
@@ -6972,7 +6972,7 @@ static IHTMLDocument2 *create_docfrag(IHTMLDocument2 *doc)
static
void
test_docfrag
(
IHTMLDocument2
*
doc
)
{
IHTMLElement
*
div
,
*
br
;
IHTMLElement
*
div
,
*
b
ody
,
*
b
r
;
IHTMLElementCollection
*
col
;
IHTMLDocument2
*
frag
;
HRESULT
hres
;
...
...
@@ -6990,6 +6990,11 @@ static void test_docfrag(IHTMLDocument2 *doc)
test_disp
((
IUnknown
*
)
frag
,
&
DIID_DispHTMLDocument
,
"[object]"
);
body
=
(
void
*
)
0xdeadbeef
;
hres
=
IHTMLDocument2_get_body
(
frag
,
&
body
);
ok
(
hres
==
S_OK
,
"get_body failed: %08x
\n
"
,
hres
);
ok
(
!
body
,
"body != NULL
\n
"
);
br
=
test_create_elem
(
doc
,
"BR"
);
test_node_append_child
((
IUnknown
*
)
frag
,
(
IUnknown
*
)
br
);
IHTMLElement_Release
(
br
);
...
...
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