fixed a crash in "white" rendering when you don't actually have the graphic for "white".

This commit is contained in:
omegablast2002@yahoo.com
2011-09-23 19:05:10 +00:00
parent eb13d9a0f9
commit 2bb651c5b4
+6
View File
@@ -185,9 +185,12 @@ void CardGui::Render()
if (isActiveConnectedParent) if (isActiveConnectedParent)
{ {
JQuadPtr white = WResourceManager::Instance()->GetQuad("white"); JQuadPtr white = WResourceManager::Instance()->GetQuad("white");
if(white)
{
white->SetColor(ARGB(255,230,50,50)); white->SetColor(ARGB(255,230,50,50));
renderer->RenderQuad(white.get(), actX, actY, actT, 30 * actZ / 16, 42 * actZ / 16); renderer->RenderQuad(white.get(), actX, actY, actT, 30 * actZ / 16, 42 * actZ / 16);
} }
}
// Am I a child of a selected card, or am I a child and myself being selected? // Am I a child of a selected card, or am I a child and myself being selected?
bool isActiveConnectedChild = mHasFocus && card->parentCards.size(); bool isActiveConnectedChild = mHasFocus && card->parentCards.size();
@@ -209,9 +212,12 @@ void CardGui::Render()
if (isActiveConnectedChild) if (isActiveConnectedChild)
{ {
JQuadPtr white = WResourceManager::Instance()->GetQuad("white"); JQuadPtr white = WResourceManager::Instance()->GetQuad("white");
if(white)
{
white->SetColor(ARGB(255,0,0,255)); white->SetColor(ARGB(255,0,0,255));
renderer->RenderQuad(white.get(), actX, actY, actT, 30 * actZ / 16, 42 * actZ / 16); renderer->RenderQuad(white.get(), actX, actY, actT, 30 * actZ / 16, 42 * actZ / 16);
} }
}
if (quad) if (quad)
{ {