Closing the PDF Document without selection showing Error

You need to first close the document in the view then dispose the document. Otherwise PDFView is referencing a disposed document which would cause the error.