mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
initialize scrollbar parameters to some sensible dummy values.
valgrind reported conditional jumps on uninitialized values in BufferView.cpp:1920 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24298 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2988537f7f
commit
bdc6d56cc7
@ -1602,8 +1602,8 @@ void BufferView::lfunScroll(FuncRequest const & cmd)
|
||||
{
|
||||
string const scroll_type = cmd.getArg(0);
|
||||
int const scroll_step =
|
||||
(scroll_type == "line")? d->scrollbarParameters_.single_step
|
||||
: (scroll_type == "page")? d->scrollbarParameters_.page_step : 0;
|
||||
(scroll_type == "line") ? d->scrollbarParameters_.single_step
|
||||
: (scroll_type == "page") ? d->scrollbarParameters_.page_step : 0;
|
||||
if (scroll_step == 0)
|
||||
return;
|
||||
string const scroll_quantity = cmd.getArg(1);
|
||||
|
@ -51,6 +51,9 @@ enum CursorStatus {
|
||||
/// Scrollbar Parameters.
|
||||
struct ScrollbarParameters
|
||||
{
|
||||
ScrollbarParameters()
|
||||
: min(0), max(1), position(0), single_step(1), page_step(1)
|
||||
{}
|
||||
/// Minimum scrollbar position in pixels.
|
||||
int min;
|
||||
/// Maximum scrollbar position in pixels.
|
||||
|
Loading…
Reference in New Issue
Block a user