SynEdit: fix crash if no images are assigned to bookmarks

git-svn-id: trunk@27890 -
This commit is contained in:
martin 2010-10-26 21:50:20 +00:00
parent 0628b67c7e
commit ab1847a0fb

View File

@ -182,7 +182,10 @@ begin
Canvas.Brush.Color := Gutter.Color;
LCLIntf.SetBkColor(Canvas.Handle, Canvas.Brush.Color);
FColumnWidth := FBookMarkOpt.BookmarkImages.Width;
if assigned(FBookMarkOpt) and assigned(FBookMarkOpt.BookmarkImages) then
FColumnWidth := FBookMarkOpt.BookmarkImages.Width
else
FColumnWidth := Width;
FColumnCount := Max((Width+1) div FColumnWidth, 1); // full columns
if FBookMarkOpt.GlyphsVisible and (LastLine >= FirstLine) then