AV when pressing ENTER on a TListFilterEdit & TTreeFilterEdit
Original Reporter info from Mantis: BBaz @basile.b
-
Reporter name:
Original Reporter info from Mantis: BBaz @basile.b
- Reporter name:
Description:
in listfilterededit.pas:
----------------------------------
function TListFilterEdit.ReturnPressed: Boolean;
// Retuns true if the Return press was forwarded to the ListBox
var
Key: Char;
begin
Key:=Char(VK_RETURN);
Result:=Assigned(fFilteredListbox.OnKeyPress);
if Result then
fFilteredListbox.OnKeyPress(fFilteredListbox, Key);
end;
----------------------------------
should test if fFilteredListbox is assigned:
----------------------------------
function TListFilterEdit.ReturnPressed: Boolean;
// Retuns true if the Return press was forwarded to the ListBox
var
Key: Char;
begin
if fFilteredListbox = nil then
exit;
Key:=Char(VK_RETURN);
Result:=Assigned(fFilteredListbox.OnKeyPress);
if Result then
fFilteredListbox.OnKeyPress(fFilteredListbox, Key);
end;
----------------------------------
otherwise an AV is thrown in case of fFilteredListbox is not assigned and if the ENTER key is pressed.
Additional information:
fixed in patch
Mantis conversion info:
- Mantis ID: 27137
- Version: 1.2.7 (SVN)
- Fixed in version: 1.3 (SVN)
- Fixed in revision: 47120 (#7ab6918c)
- Target version: 1.4