Close graphics dev in finally clause\ncloses #4408 (already closed)