mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-19 03:20:11 +03:00
fix(gx): use correct ordering when closing and nulling font face self reference
This commit is contained in:
parent
b0dbad7557
commit
d889a02083
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user