Browse Source

* fixed crash with ifs with an empty then clause

git-svn-id: branches/wasm@48055 -
nickysn 4 years ago
parent
commit
5677e7ed81
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/wasm32/nwasmflw.pas

+ 2 - 1
compiler/wasm32/nwasmflw.pas

@@ -165,7 +165,8 @@ begin
   thlcgwasm(hlcg).incblock;
   thlcgwasm(hlcg).incblock;
   thlcgwasm(hlcg).decstack(current_asmdata.CurrAsmList,1);
   thlcgwasm(hlcg).decstack(current_asmdata.CurrAsmList,1);
 
 
-  secondpass(right); // then branchs
+  if Assigned(right) then
+    secondpass(right); // then branchs
 
 
   if Assigned(t1) then // else branch
   if Assigned(t1) then // else branch
     begin
     begin