Commit b994e969 authored by cutealien's avatar cutealien

- Fix font-loading which got broken by fixed xml-loading. Thanks @ pc0de for...

- Fix font-loading which got broken by fixed xml-loading. Thanks @ pc0de for finding and providing a test and patch.
- Don't crash draw2DSpriteBatch when it get's no textures.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4109 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 059490c6
Changes in 1.8 (??.??.2011)
- XML-reader now preserves all whitespace. So even newlines are now returned as EXN_TEXT nodes.
- Support for better collada texture wrapping support on loading.
- XML-reader now ignores all whitespace-only EXN_TEXT elements as old way didn't work in cross-platform way (and arguably also not well on Windows).
- CXMLReader initializes IsEmptyElement now.
......
......@@ -1399,7 +1399,7 @@ IGUIFont* CGUIEnvironment::getFont(const io::path& filename)
EGUI_FONT_TYPE t = EGFT_CUSTOM;
bool found=false;
while(xml->read() && !found)
while(!found && xml->read())
{
if (xml->getNodeType() == io::EXN_ELEMENT)
{
......
......@@ -182,6 +182,8 @@ void CGUISpriteBank::draw2DSpriteBatch( const core::array<u32>& indices,
{
const irr::u32 drawCount = core::min_<u32>(indices.size(), pos.size());
if( Textures.empty() )
return;
core::array<SDrawBatch> drawBatches(Textures.size());
for(u32 i = 0;i < Textures.size();i++)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment