| Index: fpdfsdk/src/fpdfdoc.cpp
|
| diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp
|
| index c88dccd86a71b13a9216a3cdef098e73f60d0478..2de43ee2fbecc0eeaf10f71d95e3b9af7b03ac61 100644
|
| --- a/fpdfsdk/src/fpdfdoc.cpp
|
| +++ b/fpdfsdk/src/fpdfdoc.cpp
|
| @@ -15,16 +15,17 @@ int THISMODULE = 0;
|
| CPDF_Bookmark FindBookmark(const CPDF_BookmarkTree& tree,
|
| CPDF_Bookmark bookmark,
|
| const CFX_WideString& title) {
|
| - if (bookmark && bookmark.GetTitle().CompareNoCase(title.c_str()) == 0) {
|
| + if (bookmark.GetDict() &&
|
| + bookmark.GetTitle().CompareNoCase(title.c_str()) == 0) {
|
| // First check this item
|
| return bookmark;
|
| }
|
| // go into children items
|
| CPDF_Bookmark child = tree.GetFirstChild(bookmark);
|
| - while (child) {
|
| + while (child.GetDict()) {
|
| // check if this item
|
| CPDF_Bookmark found = FindBookmark(tree, child, title);
|
| - if (found)
|
| + if (found.GetDict())
|
| return found;
|
| child = tree.GetNextSibling(child);
|
| }
|
| @@ -112,7 +113,7 @@ DLLEXPORT FPDF_DEST STDCALL FPDFBookmark_GetDest(FPDF_DOCUMENT document,
|
| return nullptr;
|
| CPDF_Bookmark bookmark(ToDictionary(static_cast<CPDF_Object*>(pDict)));
|
| CPDF_Dest dest = bookmark.GetDest(pDoc);
|
| - if (dest)
|
| + if (dest.GetObject())
|
| return dest.GetObject();
|
| // If this bookmark is not directly associated with a dest, we try to get
|
| // action
|
|
|