mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed the issue that dynamic image name is not correctly applied in most meters. (Issue 157) An error message is now output to the log instead of showing the dialog box.
This commit is contained in:
@ -67,11 +67,19 @@ void CMeterRotator::Initialize()
|
||||
m_Bitmap = new Bitmap(m_ImageName.c_str());
|
||||
Status status = m_Bitmap->GetLastStatus();
|
||||
if(Ok != status)
|
||||
{
|
||||
DebugLog(L"Bitmap image not found: %s", m_ImageName.c_str());
|
||||
|
||||
delete m_Bitmap;
|
||||
m_Bitmap = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_Bitmap)
|
||||
{
|
||||
delete m_Bitmap;
|
||||
m_Bitmap = NULL;
|
||||
|
||||
throw CError(std::wstring(L"Bitmap image not found: ") + m_ImageName, __LINE__, __FILE__);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user