Sfoglia il codice sorgente

amiga: check if P is nil while processing params. this should never happen, except sometimes in real world it still happens. so lets be defensive about it

git-svn-id: trunk@49052 -
Károly Balogh 4 anni fa
parent
commit
50cb5707ef
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      rtl/amicommon/paramhandling.inc

+ 1 - 1
rtl/amicommon/paramhandling.inc

@@ -116,7 +116,7 @@ begin
   Count := 0;
   { first index is one }
   LocalIndex := 1;
-  while (P[Count] <> #0) do
+  while assigned(P) and (P[Count] <> #0) do
   begin
     while (p[count]=' ') or (p[count]=#9) or (p[count]=LineEnding) do
       Inc(count);