GUI: Fix use of uninitialized variable in ListWidget constructor
The _scrollBarWidth variable was used (to create the ScrollBarWidget) before it was initialized.
This commit is contained in:
parent
85fb717275
commit
97a92d2030
1 changed files with 1 additions and 2 deletions
|
@ -37,6 +37,7 @@ ListWidget::ListWidget(Dialog *boss, const String &name, const char *tooltip, ui
|
|||
: EditableWidget(boss, name, tooltip), _cmd(cmd) {
|
||||
|
||||
_entriesPerPage = 0;
|
||||
_scrollBarWidth = 0;
|
||||
|
||||
_scrollBar = new ScrollBarWidget(this, _w - _scrollBarWidth, 0, _scrollBarWidth, _h);
|
||||
_scrollBar->setTarget(this);
|
||||
|
@ -66,8 +67,6 @@ ListWidget::ListWidget(Dialog *boss, const String &name, const char *tooltip, ui
|
|||
_hlLeftPadding = _hlRightPadding = 0;
|
||||
_leftPadding = _rightPadding = 0;
|
||||
_topPadding = _bottomPadding = 0;
|
||||
|
||||
_scrollBarWidth = 0;
|
||||
}
|
||||
|
||||
ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue