mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 15:32:38 +00:00
Fix a problem using uninitialized values (scroll_x/y) in jview (detected with valgrind).
This commit is contained in:
parent
6a48cdcaa2
commit
7341d3b091
@ -60,6 +60,8 @@ JWidget jview_new()
|
|||||||
view->hasbars = true;
|
view->hasbars = true;
|
||||||
view->wherepos = 0;
|
view->wherepos = 0;
|
||||||
view->whereclick = 0;
|
view->whereclick = 0;
|
||||||
|
view->scroll_x = 0;
|
||||||
|
view->scroll_y = 0;
|
||||||
|
|
||||||
jwidget_add_hook(widget, JI_VIEW, view_msg_proc, view);
|
jwidget_add_hook(widget, JI_VIEW, view_msg_proc, view);
|
||||||
jwidget_focusrest(widget, true);
|
jwidget_focusrest(widget, true);
|
||||||
@ -68,9 +70,6 @@ JWidget jview_new()
|
|||||||
|
|
||||||
jwidget_init_theme(widget);
|
jwidget_init_theme(widget);
|
||||||
|
|
||||||
view->scroll_x = -1;
|
|
||||||
view->scroll_y = -1;
|
|
||||||
|
|
||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user