Browse Source

* fix from Thomas Schatzl for 3208

marco 20 years ago
parent
commit
62d2bd16a4
1 changed files with 9 additions and 2 deletions
  1. 9 2
      rtl/win32/graph.pp

+ 9 - 2
rtl/win32/graph.pp

@@ -1496,9 +1496,9 @@ function MessageHandleThread(p : pointer) : DWord;StdCall;
                     ExitThread(1);
                     ExitThread(1);
                  end;
                  end;
             end;
             end;
-          GraphWindow:=WinCreate;
           winregistered:=true;
           winregistered:=true;
        end;
        end;
+     GraphWindow:=WinCreate;
      if longint(GraphWindow) = 0 then begin
      if longint(GraphWindow) = 0 then begin
        MessageBox(0, 'Window creation failed', nil, mb_Ok);
        MessageBox(0, 'Window creation failed', nil, mb_Ok);
        ExitThread(1);
        ExitThread(1);
@@ -1562,6 +1562,10 @@ procedure CloseGraph;
      CloseHandle(MessageThreadHandle);
      CloseHandle(MessageThreadHandle);
      DeleteCriticalSection(graphdrawing);
      DeleteCriticalSection(graphdrawing);
      freemem(pal,sizeof(RGBrec)*maxcolor);
      freemem(pal,sizeof(RGBrec)*maxcolor);
+
+     MessageThreadID := 0;
+     MessageThreadHandle := 0;
+     isgraphmode := false;
   end;
   end;
 
 
 procedure LineWin32GUI(X1, Y1, X2, Y2: smallint); {$ifndef fpc}far;{$endif fpc}
 procedure LineWin32GUI(X1, Y1, X2, Y2: smallint); {$ifndef fpc}far;{$endif fpc}
@@ -2222,7 +2226,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.13  2005-02-14 17:13:32  peter
+  Revision 1.14  2005-03-31 12:47:20  marco
+   * fix from Thomas Schatzl for 3208
+
+  Revision 1.13  2005/02/14 17:13:32  peter
     * truncate log
     * truncate log
 
 
 }
 }