(svn r18223) -Codechange: remove the requirement of having an index for background widgets

This commit is contained in:
rubidium 2009-11-22 14:40:55 +00:00
parent 5ad4a5e3e2
commit e7075c7e2b
1 changed files with 1 additions and 2 deletions

View File

@ -1375,9 +1375,8 @@ NWidgetCore *NWidgetSpacer::GetWidgetFromPos(int x, int y)
*/
NWidgetBackground::NWidgetBackground(WidgetType tp, Colours colour, int index, NWidgetPIPContainer *child) : NWidgetCore(tp, colour, true, true, 0x0, STR_NULL)
{
this->SetIndex(index);
assert(tp == WWT_PANEL || tp == WWT_INSET || tp == WWT_FRAME);
assert(index >= 0);
if (index >= 0) this->SetIndex(index);
this->child = child;
}