org-element--cache-process-request: Fix phase 2 with nil parent field

* lisp/org-element.el (org-element--cache-process-request): Fix
potential error raised when merging phase 2 requests with current
request having nil parent field.

Should help with https://list.orgmode.org/PAXPR08MB664034C85DDC73D21AD1CB0FA39E9@PAXPR08MB6640.eurprd08.prod.outlook.com/T/#t
This commit is contained in:
Ihor Radchenko 2021-11-21 17:47:22 +08:00
parent 28d47cfb82
commit 54da1d6d7b
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 0 deletions

View File

@ -6155,6 +6155,7 @@ completing the request."
(let ((next-request (nth 1 org-element--cache-sync-requests)))
(unless (and (org-element-property :cached (org-element--request-parent next-request))
(org-element-property :begin (org-element--request-parent next-request))
parent
(> (org-element-property :begin (org-element--request-parent next-request))
(org-element-property :begin parent)))
(setf (org-element--request-parent next-request) parent)))