tvplanit: Fix json demo crashing if data file does not yet exist.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5964 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-06-27 07:52:52 +00:00
parent 8afa81832f
commit d6b78be9b6

View File

@ -477,9 +477,12 @@ var
res: TVpResource;
i, j: Integer;
begin
if FFileName = '' then
if (FFileName = '') then
raise Exception.Create(RSNoFilenameSpecified);
if not FileExists(FFileName) then
exit;
stream := TFileStream.Create(FFilename, fmOpenRead + fmShareDenyWrite);
try
Resources.ClearResources;