From 7dbc77a1e74be00f520e84fa1605a9ba42a05879 Mon Sep 17 00:00:00 2001 From: alberth Date: Tue, 22 Dec 2009 19:40:23 +0000 Subject: (svn r18605) -Codechange: Coding style fixes, prevent useless calls to UpdateWidgetSize(). --- src/widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widget.cpp') diff --git a/src/widget.cpp b/src/widget.cpp index e403b20c8..a79d01197 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -971,7 +971,7 @@ void NWidgetStacked::SetupSmallestSize(Window *w, bool init_array) Dimension fill = {0, 0}; Dimension resize = {0, 0}; /* Here we're primarily interested in the value of resize */ - w->UpdateWidgetSize(this->index, &size, padding, &fill, &resize); + if (this->index >= 0) w->UpdateWidgetSize(this->index, &size, padding, &fill, &resize); this->smallest_x = size.width; this->smallest_y = size.height; -- cgit v1.2.3-70-g09d2