lcl: gtk3: TGtk3ListView.ItemGetState: use StrToIntDef, from Alexey

git-svn-id: trunk@54647 -
This commit is contained in:
mattias 2017-04-20 07:09:46 +00:00
parent 24ed61d2db
commit 74a0685b73

View File

@ -5688,12 +5688,11 @@ begin
PGtkIconView(GetContainerWidget)^.get_cursor(@Path, Cell);
if Assigned(Path) then
begin
AStr := gtk_tree_path_to_string(path);
AIsSet := (StrToInt(AStr) = AIndex);
AStr := gtk_tree_path_to_string(Path);
AIsSet := (StrToIntDef(AStr,-1) = AIndex);
if AStr <> nil then
g_free(AStr);
if Path <> nil then
gtk_tree_path_free(Path);
gtk_tree_path_free(Path);
Result := True;
end;
end;