FIX: Don't determine file without extension as image file

This commit is contained in:
Alexander Koblov 2011-01-03 12:06:07 +00:00
commit 1b53ab2ace

View file

@ -439,7 +439,7 @@ begin
sExtFilter := UTF8LowerCase(ExtractFileExt(sFileName)) + ';';
sGraphicFilter := GraphicFilter(TGraphic);
// if file is graphic
if (Pos(sExtFilter, sGraphicFilter) <> 0) and mbFileExists(sFileName) then
if (Length(sExtFilter) > 1) and (Pos(sExtFilter, sGraphicFilter) <> 0) and mbFileExists(sFileName) then
begin
{$IFDEF LCLGTK2}
pbPicture := gdk_pixbuf_new_from_file(PChar(sFileName), nil);