diff --git a/lcl/grids.pas b/lcl/grids.pas index 99ba8c978c..c2516d933c 100644 --- a/lcl/grids.pas +++ b/lcl/grids.pas @@ -10841,7 +10841,7 @@ end; procedure TGridColumnTitle.SetCaption(const AValue: TCaption); begin - if (FCaption=nil)or(AValue<>FCaption^) then begin + if (FCaption=nil)or(AValue<>StrPas(FCaption)) then begin if FCaption<>nil then StrDispose(FCaption); FCaption := StrNew(PChar(AValue));