Make sure we don't leak the QPlatformFontDatabase using smart pointers
Found it when running KWin on ASAN
This commit is contained in:
parent
e15004ff98
commit
02fc40fa4a
2 changed files with 2 additions and 2 deletions
|
@ -141,7 +141,7 @@ QPlatformOffscreenSurface *Integration::createPlatformOffscreenSurface(QOffscree
|
|||
|
||||
QPlatformFontDatabase *Integration::fontDatabase() const
|
||||
{
|
||||
return m_fontDb;
|
||||
return m_fontDb.data();
|
||||
}
|
||||
|
||||
QPlatformTheme *Integration::createPlatformTheme(const QString &name) const
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
private:
|
||||
void initScreens();
|
||||
|
||||
QPlatformFontDatabase *m_fontDb;
|
||||
QScopedPointer<QPlatformFontDatabase> m_fontDb;
|
||||
QPlatformNativeInterface *m_nativeInterface;
|
||||
Screen *m_dummyScreen = nullptr;
|
||||
QScopedPointer<QPlatformInputContext> m_inputContext;
|
||||
|
|
Loading…
Reference in a new issue