Fix assert in SkinManager when file referenced by <application_logo> tag is missing

This commit is contained in:
Charlie Fenton 2012-10-25 23:08:25 -07:00 committed by Oliver Bock
parent 8caede1641
commit eab5fcc5c8
2 changed files with 8 additions and 2 deletions

View File

@ -6223,7 +6223,9 @@ Charlie 25 Oct 2012
- Mac: Fix Quit command in Simple View and a crash bug with Quit AppleEvent.
- Fix a bad FlexGridSizer in Simple Preferences dialog which caused assert.
- Fix assert in Simple Preferences: use window foreground color for
CTransparentStaticLine if skin does not specify <static_line_color>.
CTransparentStaticLine if skin does not specify <static_line_color> tag.
- Fix assert in SkinManager when file referenced by <application_logo> tag
is missing.
clientgui/
BOINCGUIApp.cpp
@ -6232,3 +6234,4 @@ Charlie 25 Oct 2012
MacBitmapComboBox.cpp,.h
sg_CustomControls.cpp,.h
sg_DlgPreferences.cpp
SkinManager.cpp

View File

@ -25,6 +25,7 @@
#include "util.h"
#include "error_numbers.h"
#include "miofile.h"
#include "filesys.h"
#include "BOINCGUIApp.h"
#include "BOINCBaseFrame.h"
#include "SkinManager.h"
@ -414,7 +415,9 @@ int CSkinAdvanced::Parse(MIOFILE& in) {
wxGetApp().GetSkinManager()->ConstructSkinPath() +
wxString(strBuffer.c_str(), wxConvUTF8)
);
m_bitmapApplicationLogo = wxBitmap(wxImage(str.c_str(), wxBITMAP_TYPE_ANY));
if (boinc_file_exists(str.c_str())) {
m_bitmapApplicationLogo = wxBitmap(wxImage(str.c_str(), wxBITMAP_TYPE_ANY));
}
}
continue;
} else if (parse_str(buf, "<organization_name>", strBuffer)) {