mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1715944 - Set the cached theme handle to Nothing() if the holding value was null. r=Gijs
In the class stlye of Win7, `OpenThemeData` returns null. The problem is `ThemeHandle::Close()` did not reset the cached value to `Nothing()` if the holding value was null. As a result, we never fetch the theme handle after the theme is changed. Differential Revision: https://phabricator.services.mozilla.com/D121288
This commit is contained in:
parent
a0e4108ae9
commit
fefaf12909
@ -39,12 +39,13 @@ void nsUXThemeData::ThemeHandle::OpenOnce(HWND aWindow, LPCWSTR aClassList) {
|
||||
}
|
||||
|
||||
void nsUXThemeData::ThemeHandle::Close() {
|
||||
if (mHandle.isNothing() || !mHandle.value()) {
|
||||
if (mHandle.isNothing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
CloseThemeData(mHandle.value());
|
||||
mHandle = Nothing();
|
||||
if (HANDLE rawHandle = mHandle.extract()) {
|
||||
CloseThemeData(rawHandle);
|
||||
}
|
||||
}
|
||||
|
||||
nsUXThemeData::ThemeHandle::operator HANDLE() {
|
||||
|
Loading…
Reference in New Issue
Block a user