openglcontrol: added exception when no visual was found

git-svn-id: trunk@14437 -
This commit is contained in:
mattias 2008-03-05 22:05:25 +00:00
parent 3370c28e62
commit 89b48f4f33
4 changed files with 7 additions and 3 deletions

View File

@ -409,6 +409,8 @@ begin
if visual=nil then exit;
vi := get_xvisualinfo(visual);
{$ENDIF}
if vi=nil then
raise Exception.Create('gdk_gl_context_share_new no visual found');
PrivateShareList:=PGdkGLContextPrivate(sharelist);
if (sharelist<>nil) then

View File

@ -25,10 +25,10 @@
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="LCL"/>
<PackageName Value="LazOpenGLContext"/>
</Item1>
<Item2>
<PackageName Value="LazOpenGLContext"/>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">

View File

@ -352,6 +352,8 @@ end;
{------------------------------------------------------------------------------
function CompareFileExt(const Filename, Ext: string;
CaseSensitive: boolean): integer;
Ext can contain a point or not
------------------------------------------------------------------------------}
function CompareFileExt(const Filename, Ext: string;
CaseSensitive: boolean): integer;

View File

@ -309,7 +309,7 @@ var
Item: TPOFileItem;
begin
if (TranslatedValue='') then exit;
//debugln('TPOFile.Add Identifier="',Identifier,'" OriginalValue="',OriginalValue,'" TranslatedValue="',TranslatedValue,'"');
debugln('TPOFile.Add Identifier="',Identifier,'" OriginalValue="',OriginalValue,'" TranslatedValue="',TranslatedValue,'"');
Item:=TPOFileItem.Create(Identifier,OriginalValue,TranslatedValue);
FItems.Add(Item);
FIdentifierToItem.Add(Identifier,Item);