refs #8288. Fix dereference of invalid pointer

Handle the case that no minimum or maximum is found. This prevents the crash.
Merge remote-tracking branch 'origin/feature/8288_lineviewer_crash'