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:
parent
ca63182f5c
commit
1b1de55a20
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user