From faec8229e2821660a7fa0d4784395db944f6a15c Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Thu, 21 Apr 2011 11:44:59 +0000 Subject: [PATCH] fpvectorial: Fixes sigsegv in case of a format declared without either the reader or writer but with the other one git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1592 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- applications/fpvviewer/fpvectorialsrc/fpvectorial.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/applications/fpvviewer/fpvectorialsrc/fpvectorial.pas b/applications/fpvviewer/fpvectorialsrc/fpvectorial.pas index e1d423343..e2832d60b 100644 --- a/applications/fpvviewer/fpvectorialsrc/fpvectorial.pas +++ b/applications/fpvviewer/fpvectorialsrc/fpvectorial.pas @@ -771,7 +771,8 @@ begin for i := 0 to Length(GvVectorialFormats) - 1 do if GvVectorialFormats[i].Format = AFormat then begin - Result := GvVectorialFormats[i].WriterClass.Create; + if GvVectorialFormats[i].WriterClass <> nil then + Result := GvVectorialFormats[i].WriterClass.Create; Break; end; @@ -792,7 +793,8 @@ begin for i := 0 to Length(GvVectorialFormats) - 1 do if GvVectorialFormats[i].Format = AFormat then begin - Result := GvVectorialFormats[i].ReaderClass.Create; + if GvVectorialFormats[i].ReaderClass <> nil then + Result := GvVectorialFormats[i].ReaderClass.Create; Break; end;