Browse Source

* check for nil in concat_multi

git-svn-id: trunk@2658 -
peter 19 years ago
parent
commit
9cd5a800af
2 changed files with 12 additions and 6 deletions
  1. 6 3
      rtl/inc/astrings.inc
  2. 6 3
      rtl/inc/wstrings.inc

+ 6 - 3
rtl/inc/astrings.inc

@@ -185,9 +185,12 @@ begin
   for i:=low(sarr) to high(sarr) do
   for i:=low(sarr) to high(sarr) do
     begin
     begin
       p:=pointer(sarr[i]);
       p:=pointer(sarr[i]);
-      Size:=length(ansistring(p));
-      Move(pchar(p)^,pc^,Size+1);
-      inc(pc,size);
+      if assigned(p) then
+        begin
+          Size:=length(ansistring(p));
+          Move(pchar(p)^,pc^,Size+1);
+          inc(pc,size);
+        end;
     end;
     end;
 end;
 end;
 
 

+ 6 - 3
rtl/inc/wstrings.inc

@@ -425,9 +425,12 @@ begin
   for i:=low(sarr) to high(sarr) do
   for i:=low(sarr) to high(sarr) do
     begin
     begin
       p:=pointer(sarr[i]);
       p:=pointer(sarr[i]);
-      Size:=length(widestring(p));
-      Move(pwidechar(p)^,pc^,(Size+1)*sizeof(WideChar));
-      inc(pc,size);
+      if assigned(p) then
+        begin
+          Size:=length(widestring(p));
+          Move(pwidechar(p)^,pc^,(Size+1)*sizeof(WideChar));
+          inc(pc,size);
+        end;
     end;
     end;
 end;
 end;