From e831cf4bde75be8adb4f70960d814da190d09200 Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Tue, 25 Jan 2011 14:46:25 +0000 Subject: [PATCH] Lines in new DXF versions can be drawn now git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1460 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- applications/fpvviewer/fpvectorialsrc/dxfvectorialreader.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/applications/fpvviewer/fpvectorialsrc/dxfvectorialreader.pas b/applications/fpvviewer/fpvectorialsrc/dxfvectorialreader.pas index 5ca14d994..a8848bef3 100644 --- a/applications/fpvviewer/fpvectorialsrc/dxfvectorialreader.pas +++ b/applications/fpvviewer/fpvectorialsrc/dxfvectorialreader.pas @@ -353,6 +353,11 @@ begin begin // Now read and process the item name CurToken := TDXFToken(ATokens.Items[i]); + + // Avoid an exception by previously checking if the conversion can be made + if (CurToken.StrValue = 'AcDbEntity') or + (CurToken.StrValue = 'AcDbLine') then Continue; + CurToken.FloatValue := StrToFloat(Trim(CurToken.StrValue)); case CurToken.GroupCode of