Closed
Bug 377045
Opened 19 years ago
Closed 19 years ago
Crash in nsDocAccessible::GetParent()
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: aaronlev, Assigned: aaronlev)
Details
(Keywords: access, crash)
Attachments
(1 file)
|
2.41 KB,
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
Missing null pointer check.
| Assignee | ||
Comment 1•19 years ago
|
||
Attachment #261157 -
Flags: review?(surkov.alexander)
Comment 2•19 years ago
|
||
Comment on attachment 261157 [details] [diff] [review]
Null checks
>Index: accessible/src/base/nsDocAccessible.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/accessible/src/base/nsDocAccessible.cpp,v
>retrieving revision 1.132
>diff -p -u -5 -r1.132 nsDocAccessible.cpp
>--- accessible/src/base/nsDocAccessible.cpp 10 Apr 2007 16:28:38 -0000 1.132
>+++ accessible/src/base/nsDocAccessible.cpp 10 Apr 2007 17:26:35 -0000
>@@ -439,25 +439,26 @@ NS_IMETHODIMP nsDocAccessible::CacheAcce
>
> NS_IMETHODIMP nsDocAccessible::GetParent(nsIAccessible **aParent)
> {
> // Hook up our new accessible with our parent
> if (!mParent) {
>+ *aParent = nsnull;
>+ NS_ENSURE_TRUE(mDocument, NS_ERROR_FAILURE);
Probably you should move these lines on top of the method. I think doc accessible cannot have parent without mDocument.
Attachment #261157 -
Flags: review?(surkov.alexander) → review+
| Assignee | ||
Updated•19 years ago
|
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•