Browse Source

- Fixed bug which caused an exception when the CompositeSprite culling was turned-off.
- Fixed bug where an assert was issued when an invalid CompositeSprite layout was specified.

MelvMay-GG 12 years ago
parent
commit
ba75284

+ 1 - 0
engine/source/2d/core/SpriteBatch.cc

@@ -1232,6 +1232,7 @@ void SpriteBatch::destroySpriteBatchQuery( void )
 
     // Finish if sprite clipping 
     delete mpSpriteBatchQuery;
+    mpSpriteBatchQuery = NULL;
 }
 
 //------------------------------------------------------------------------------

+ 2 - 2
engine/source/2d/sceneobject/CompositeSprite.cc

@@ -267,8 +267,8 @@ SpriteBatchItem* CompositeSprite::createSprite( const SpriteBatchItem::LogicalPo
             return createCustomLayout( logicalPosition );
 
         default:
-            // Sanity!
-            AssertFatal( false, "CompositeSprite::createSprite() - Unknown layout type encountered." );
+            // Warn.
+            Con::warnf( "CompositeSprite::createSprite() - Unknown layout type encountered." );
             return SpriteBatch::createSprite( logicalPosition );
     }
 }