diff -r 6102a11f48be lib/irrlicht/source/Irrlicht/CGUIContextMenu.cpp --- a/lib/irrlicht/source/Irrlicht/CGUIContextMenu.cpp Wed Sep 23 01:16:38 2009 +0200 +++ b/lib/irrlicht/source/Irrlicht/CGUIContextMenu.cpp Wed Sep 23 01:20:50 2009 +0200 @@ -767,27 +767,33 @@ void CGUIContextMenu::deserializeAttribu bool autochecking=false; tmp = "IsSeparator"; tmp += i; - if ( in->getAttributeAsBool(tmp.c_str()) ) + if ( in->existsAttribute(tmp.c_str()) && in->getAttributeAsBool(tmp.c_str()) ) addSeparator(); else { tmp = "Text"; tmp += i; - txt = in->getAttributeAsStringW(tmp.c_str()); + if ( in->existsAttribute(tmp.c_str()) ) + txt = in->getAttributeAsStringW(tmp.c_str()); tmp = "TextID"; tmp += i; - txtID = in->getAttributeAsStringW(tmp.c_str()); + if ( in->existsAttribute(tmp.c_str()) ) + txtID = in->getAttributeAsStringW(tmp.c_str()); tmp = "CommandID"; tmp += i; - commandid = in->getAttributeAsInt(tmp.c_str()); + if ( in->existsAttribute(tmp.c_str()) ) + commandid = in->getAttributeAsInt(tmp.c_str()); tmp = "Enabled"; tmp += i; - enabled = in->getAttributeAsBool(tmp.c_str()); + if ( in->existsAttribute(tmp.c_str()) ) + enabled = in->getAttributeAsBool(tmp.c_str()); tmp = "Checked"; tmp += i; - checked = in->getAttributeAsBool(tmp.c_str()); + if ( in->existsAttribute(tmp.c_str()) ) + checked = in->getAttributeAsBool(tmp.c_str()); tmp = "AutoChecking"; tmp += i; - autochecking = in->getAttributeAsBool(tmp.c_str()); + if ( in->existsAttribute(tmp.c_str()) ) + autochecking = in->getAttributeAsBool(tmp.c_str()); s32 id = addItem(core::stringw(txt.c_str()).c_str(), commandid, enabled, false, checked, autochecking); Items[id].TextID = txtID;