From fed01ba7093a63b588418f775942be46f7104720 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sun, 22 Aug 2010 13:50:03 +0200 Subject: docview: sanity check added if no files are opened, stop trying to process nothing. --- docview/src/frm_main.pas | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docview') diff --git a/docview/src/frm_main.pas b/docview/src/frm_main.pas index 4a6231cf..64a07ecb 100644 --- a/docview/src/frm_main.pas +++ b/docview/src/frm_main.pas @@ -1147,6 +1147,9 @@ function TMainForm.OpenFiles(const FileNames: TStrings; begin LogEvent(LogStartup, 'OpenFiles' ); + if CurrentOpenFiles.Count = 0 then + exit; // nothing to do + //if not OKToCloseFile then // exit; -- cgit v1.2.3-54-g00ecf