]> git.eshelyaron.com Git - emacs.git/commit
Make ftcrfont_close idempotent
authorPip Cet <pipcet@protonmail.com>
Sat, 10 Aug 2024 16:57:49 +0000 (16:57 +0000)
committerEshel Yaron <me@eshelyaron.com>
Sun, 11 Aug 2024 07:31:53 +0000 (09:31 +0200)
commitd3e862e2814f020185fc36dee9c9de863b4cbb66
treee459c54c99e3b98bb898d289f258307701f2d2e8
parente6441fda020ceca666812ac8052b3f8f0dacbeca
Make ftcrfont_close idempotent

This prevents crashes when running code like:

(let ((font (open-font (find-font (font-spec ...)))))
  (close-font font)
  (close-font font))

* src/ftcrfont.c (ftcrfont_close): Make sure the function can be run
several times in a row without crashing.

(cherry picked from commit 1a38936299d3c93767e4b542ccde990ea08379e3)
src/ftcrfont.c