Changeset 32 for trunk/Start.pas


Ignore:
Timestamp:
Jan 8, 2017, 11:09:33 PM (7 years ago)
Author:
chronos
Message:
  • Fixed: Avoid exception during read from registry.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Start.pas

    r31 r32  
    986986        Reg := TRegistry.Create;
    987987        Reg.OpenKey('SOFTWARE\cevo\RegVer9\Start', true);
    988         try
    989           MapCount := Reg.ReadInteger('MapCount');
    990         except
    991           MapCount := 0;
    992         end;
     988        if Reg.ValueExists('MapCount') then
     989          MapCount := Reg.ReadInteger('MapCount')
     990          else  MapCount := 0;
    993991        inc(MapCount);
    994992        Reg.WriteInteger('MapCount', MapCount);
Note: See TracChangeset for help on using the changeset viewer.