hwhw/kindlepdfviewer — pull request #643 by tigran123 (2012-11-28 17:22:29+00:00)
Title: Bugfix: crash when switching user privilege level

A simple sequence of steps can cause segmentation violation (coredump), namely:

1. Start KPV in a directory with just two page worths of books visible
in "beginner" mode but containining more than two page worths of files
visible in "expert" mode.

2. Change user privilege level from beginner to expert

3. Page down three times (to arrive on page 3)

4. Now change user privilege level back to beginner

5. Observe that the cursor is sitting on an empty line (non-existent book)

6. Try paging down -> segmentation violation.