Fix a crash when live view is not supported ...

... and live view is switched on and off again
(cherry picked from commit ed808fbdfbef79f9d8e82ba4ef0cea0968ee746f)
graduatednd: fix (marginal) bug in distance calculation
(cherry picked from commit 18377a51aa648bada37d2320d8b9ed5100ab6930)