From e7075c7e2b9c73b32bcc07b6eb409db931b1cb7b Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 22 Nov 2009 14:40:55 +0000 Subject: [PATCH] (svn r18223) -Codechange: remove the requirement of having an index for background widgets --- src/widget.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/widget.cpp b/src/widget.cpp index c7372dce07..5ed3e349d0 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -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; }