Added some debug code to inform of incorrect removal of widgets.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5757 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2010-08-21 13:18:24 +00:00
parent ca63182f5c
commit 1b1de55a20

View File

@ -218,6 +218,14 @@ void Screen::manualAddWidget(Widget* w)
void Screen::manualRemoveWidget(Widget* w)
{
assert(m_magic_number == 0xCAFEC001);
#ifdef DEBUG
if(!m_widgets.contains(w))
{
fprintf(stderr, "Widget '%d' not found in screen when removing.\n",
w->m_id);
fprintf(stderr, "This can be ignored, but is probably wrong.\n");
}
#endif
m_widgets.remove(w);
} // manualRemoveWidget