fix(gx): use correct ordering when closing and nulling font face self reference

This commit is contained in:
fallenoak 2023-02-21 16:00:19 -06:00
parent b0dbad7557
commit d889a02083
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D

View File

@ -14,8 +14,9 @@ void FontFaceCloseHandle(HFACE handle) {
FACEDATA* dataPtr = reinterpret_cast<FACEDATA*>(handle);
if (dataPtr->m_refcount <= 1) {
HandleClose(dataPtr->selfReference);
auto selfReference = dataPtr->selfReference;
dataPtr->selfReference = nullptr;
HandleClose(selfReference);
}
}