mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed that an uninitialized skin stays in memory when fatal error occurred.
This commit is contained in:
parent
83675c7f30
commit
a52abc05af
@ -2229,15 +2229,8 @@ void CRainmeter::ActivateConfig(int configIndex, int iniIndex)
|
||||
m_ConfigStrings[configIndex].active = iniIndex + 1;
|
||||
WriteActive(skinConfig, iniIndex);
|
||||
|
||||
try
|
||||
{
|
||||
CreateMeterWindow(skinPath, skinConfig, skinIniFile);
|
||||
}
|
||||
catch (CError& error)
|
||||
{
|
||||
LogError(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool CRainmeter::DeactivateConfig(CMeterWindow* meterWindow, int configIndex, bool save)
|
||||
@ -2287,11 +2280,21 @@ void CRainmeter::CreateMeterWindow(const std::wstring& path, const std::wstring&
|
||||
if (mw)
|
||||
{
|
||||
m_Meters[config] = mw;
|
||||
|
||||
try
|
||||
{
|
||||
mw->Initialize(*this);
|
||||
|
||||
CDialogAbout::UpdateSkins();
|
||||
CDialogManage::UpdateSkins(mw);
|
||||
}
|
||||
catch (CError& error)
|
||||
{
|
||||
DeleteMeterWindow(mw, false);
|
||||
LogError(error);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void CRainmeter::ClearDeleteLaterList()
|
||||
|
Loading…
Reference in New Issue
Block a user