Jeck - Fixed issue with destructor not being called on OptionProfile, split settings into tabs.

This commit is contained in:
wagic.jeck
2009-08-27 14:08:38 +00:00
parent 99aa284431
commit db1730ee7f
4 changed files with 37 additions and 45 deletions

View File

@@ -223,15 +223,11 @@ void OptionProfile::populate(){
options[Options::ACTIVE_PROFILE].str = selections[value];
SAFE_DELETE(mAvatar);
SAFE_DELETE(mAvatarTex);
mAvatarTex = JRenderer::GetInstance()->LoadTexture(options.profileFile("avatar.jpg","",true,true).c_str(), false);
if (mAvatarTex) {
SAFE_DELETE(mAvatar);
if (mAvatarTex)
mAvatar = NEW JQuad(mAvatarTex, 0, 0, 35, 50);
renderer->BindTexture(mAvatarTex); //Prevents font corruption.
}
else
mAvatar = NULL;
options.checkProfile();
PlayerData * pdata = NEW PlayerData(app->collection);