checks for current document

checks for current doc before drawing line, keeps the line from showing when no document is loaded