Skip to content

Commit dc97ad7

Browse files
committed
Skipping invalid json file
1 parent 8eae7b7 commit dc97ad7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Modules/DelphiFMX/uMain.pas

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ function TryLoadVerFromModuleDefs(): boolean;
6161
var LFilePath := GetModuleDefsJSONFilePath();
6262
if TFile.Exists(LFilePath) then begin
6363
var LJson := TJSONObject.ParseJSONValue(TFile.ReadAllText(LFilePath));
64+
if not Assigned(LJson) then
65+
Exit(false);
6466

6567
var LPythonHome := String.Empty;
6668
if LJson.TryGetValue<string>('python_home', LPythonHome) then begin

0 commit comments

Comments
 (0)