QCocoaInputContext: Fix wrong memory release
As per Core Foundation ownership conventions, we should release 'source', which is a copy, and not 'langRef', which is a reference. This has shown to lead to crashes in some occasions. Change-Id: I2e59b8d62aac13bc60dc013c1ea621850132c719 Task-number: QTBUG-48772 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
parent
ecb73a7bb3
commit
b13ff07f1d
@ -131,8 +131,8 @@ void QCocoaInputContext::updateLocale()
|
||||
m_locale = locale;
|
||||
emitLocaleChanged();
|
||||
}
|
||||
CFRelease(langRef);
|
||||
}
|
||||
CFRelease(source);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
Loading…
x
Reference in New Issue
Block a user