Fix a problem using uninitialized values (scroll_x/y) in jview (detected with valgrind).

This commit is contained in:
David Capello 2010-10-26 13:57:59 -07:00
parent 6a48cdcaa2
commit 7341d3b091

View File

@ -60,6 +60,8 @@ JWidget jview_new()
view->hasbars = true;
view->wherepos = 0;
view->whereclick = 0;
view->scroll_x = 0;
view->scroll_y = 0;
jwidget_add_hook(widget, JI_VIEW, view_msg_proc, view);
jwidget_focusrest(widget, true);
@ -68,9 +70,6 @@ JWidget jview_new()
jwidget_init_theme(widget);
view->scroll_x = -1;
view->scroll_y = -1;
return widget;
}