Changeset 32 for trunk


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

Legend:

Unmodified
Added
Removed
  • trunk/Direct.pas

    r30 r32  
    77  Messg,
    88
    9   LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms;
     9  LCLIntf, LCLType, {$IFDEF Linux}LMessages, {$ENDIF}Messages, SysUtils, Classes, Graphics, Controls, Forms;
    1010
    1111const
  • trunk/Integrated.lpi

    r30 r32  
    395395        <Filename Value="LocalPlayer\TechTree.pas"/>
    396396        <IsPartOfProject Value="True"/>
    397         <ComponentName Value="TechTreeDlg"/>
    398         <HasResources Value="True"/>
    399         <ResourceBaseClass Value="Form"/>
     397        <HasResources Value="True"/>
    400398      </Unit40>
    401399      <Unit41>
     
    432430        <StackChecks Value="True"/>
    433431      </Checks>
     432      <VerifyObjMethodCallValidity Value="True"/>
    434433    </CodeGeneration>
    435434    <Linking>
  • 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.