summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/widget.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index c7372dce0..5ed3e349d 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;
}