Setup: Fix crash if ROM was present.
This commit is contained in:
parent
a0fb9bc4ab
commit
3441c390bd
|
@ -127,7 +127,8 @@ end;
|
||||||
var ROMFilePage: TInputFileWizardPage;
|
var ROMFilePage: TInputFileWizardPage;
|
||||||
var R : longint;
|
var R : longint;
|
||||||
var rom: string;
|
var rom: string;
|
||||||
procedure InitializeWizard();
|
|
||||||
|
procedure AddRomPage();
|
||||||
begin
|
begin
|
||||||
rom := FileSearch('Zelda no Densetsu - Kamigami no Triforce (Japan).sfc', WizardDirValue());
|
rom := FileSearch('Zelda no Densetsu - Kamigami no Triforce (Japan).sfc', WizardDirValue());
|
||||||
if Length(rom) > 0 then
|
if Length(rom) > 0 then
|
||||||
|
@ -152,13 +153,19 @@ begin
|
||||||
ROMFilePage.Add(
|
ROMFilePage.Add(
|
||||||
'Location of ROM file:',
|
'Location of ROM file:',
|
||||||
'SNES ROM files|*.sfc|All files|*.*',
|
'SNES ROM files|*.sfc|All files|*.*',
|
||||||
'.sfc');
|
'.sfc');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure InitializeWizard();
|
||||||
|
begin
|
||||||
|
AddRomPage();
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function ShouldSkipPage(PageID: Integer): Boolean;
|
function ShouldSkipPage(PageID: Integer): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
if PageID = ROMFilePage.ID then
|
if (assigned(ROMFilePage)) and (PageID = ROMFilePage.ID) then
|
||||||
Result := not (WizardIsComponentSelected('client/lttp') or WizardIsComponentSelected('generator'));
|
Result := not (WizardIsComponentSelected('client/lttp') or WizardIsComponentSelected('generator'));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue