Skip to content

Commit

Permalink
Don’t crash when a FontConfig object is destroyed early
Browse files Browse the repository at this point in the history
Fix #2128.
  • Loading branch information
liZe committed Apr 25, 2024
1 parent 245e4f5 commit 70cafe1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions weasyprint/text/fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class FontConfiguration:
:class:`weasyprint.CSS` to find fonts in ``@font-face`` rules.
"""
_folder = None # required by __del__ when code stops before __init__ finishes

def __init__(self):
"""Create a FreeType font configuration.
Expand Down

0 comments on commit 70cafe1

Please sign in to comment.