Browse Source

--- Merging r34736 into '.':
U rtl/win/systhrd.inc
--- Recording mergeinfo for merge of r34736 into '.':
U .

# revisions: 34736

git-svn-id: branches/fixes_3_0@35382 -

marco 8 years ago
parent
commit
9f9a77acd0
1 changed files with 7 additions and 2 deletions
  1. 7 2
      rtl/win/systhrd.inc

+ 7 - 2
rtl/win/systhrd.inc

@@ -409,10 +409,15 @@ type Tbasiceventstate=record
 
 
 function intBasicEventCreate(EventAttributes : Pointer;
 function intBasicEventCreate(EventAttributes : Pointer;
 AManualReset,InitialState : Boolean;const Name : ansistring):pEventState;
 AManualReset,InitialState : Boolean;const Name : ansistring):pEventState;
-
+var
+  n : PChar;
 begin
 begin
   new(plocaleventrec(result));
   new(plocaleventrec(result));
-  plocaleventrec(result)^.FHandle := CreateEvent(EventAttributes, AManualReset, InitialState,PChar(Name));
+  if Length(Name) = 0 then
+    n := Nil
+  else
+    n := PChar(Name);
+  plocaleventrec(result)^.FHandle := CreateEvent(EventAttributes, AManualReset, InitialState,n);
 end;
 end;
 
 
 procedure intbasiceventdestroy(state:peventstate);
 procedure intbasiceventdestroy(state:peventstate);