QWindowsFontEngineDirectWrite: Fix resources leaking
fontFamily has been acquired by IDWriteFont::GetFontFamily() and thus must be released with IDWriteFontFamily::Release(). Task-number: QTBUG-26861 Change-Id: I314153f97b8b59c9ba728220f93b493b13337039 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
d121b37a4a
commit
112b31bed6
@ -740,6 +740,8 @@ void QWindowsFontEngineDirectWrite::initFontInfo(const QFontDef &request,
|
||||
|
||||
if (familyNames != NULL)
|
||||
familyNames->Release();
|
||||
if (fontFamily)
|
||||
fontFamily->Release();
|
||||
|
||||
if (FAILED(hr))
|
||||
qErrnoWarning(hr, "initFontInfo: Failed to get family name");
|
||||
|
Loading…
Reference in New Issue
Block a user