* changed library handle types to the correct TLibHandle

* avoid call of FreeLibrary() with zero, because it crashes on some linux versions

git-svn-id: trunk@2748 -
This commit is contained in:
tom_at_work 2006-03-04 23:40:43 +00:00
parent 88a8aa31d9
commit 7f192e369e
3 changed files with 9 additions and 6 deletions

View File

@ -74,7 +74,7 @@ uses
{$IFNDEF MORPHOS} {$IFNDEF MORPHOS}
var var
LibGL: THandle; LibGL: TLibHandle;
{$ENDIF MORPHOS} {$ENDIF MORPHOS}
type type
@ -1917,7 +1917,8 @@ begin
@ChoosePixelFormat := nil; @ChoosePixelFormat := nil;
{$ENDIF} {$ENDIF}
FreeLibrary(LibGL); if (LibGL <> 0) then
FreeLibrary(LibGL);
{$ENDIF MORPHOS} {$ENDIF MORPHOS}
end; end;

View File

@ -394,7 +394,7 @@ implementation
{$ELSE MORPHOS} {$ELSE MORPHOS}
var var
hDLL: THandle; hDLL: TLibHandle;
{$ENDIF MORPHOS} {$ENDIF MORPHOS}
@ -456,7 +456,8 @@ begin
@gluNextContour := nil; @gluNextContour := nil;
@gluEndPolygon := nil; @gluEndPolygon := nil;
FreeLibrary(hDLL); if (hDLL <> 0) then
FreeLibrary(hDLL);
{$ENDIF MORPHOS} {$ENDIF MORPHOS}
end; end;

View File

@ -470,7 +470,7 @@ implementation
{$ELSE MORPHOS} {$ELSE MORPHOS}
var var
hDLL: THandle; hDLL: TLibHandle;
{$ENDIF MORPHOS} {$ENDIF MORPHOS}
procedure FreeGlut; procedure FreeGlut;
@ -479,7 +479,8 @@ begin
// MorphOS's GL will closed down by TinyGL unit, nothing is needed here. // MorphOS's GL will closed down by TinyGL unit, nothing is needed here.
{$ELSE MORPHOS} {$ELSE MORPHOS}
FreeLibrary(hDLL); if (hDLL <> 0) then
FreeLibrary(hDLL);
@glutInit := nil; @glutInit := nil;
@glutInitDisplayMode := nil; @glutInitDisplayMode := nil;