docview: Added some extra error checking code to prevent exception errors.
docview: Added some extra error checking code to prevent exception errors.

wkitty42/fpGUI,wkitty42/fpGUI,wkitty42/fpGUI,wkitty42/fpGUI,wkitty42/fpGUI,wkitty42/fpGUI