diff options
Diffstat (limited to 'plugins/Utils.pas/wrapper.pas')
-rw-r--r-- | plugins/Utils.pas/wrapper.pas | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Utils.pas/wrapper.pas b/plugins/Utils.pas/wrapper.pas index 0a8090b105..c6d0c5976d 100644 --- a/plugins/Utils.pas/wrapper.pas +++ b/plugins/Utils.pas/wrapper.pas @@ -342,8 +342,10 @@ begin li.iItem :=item;
li.mask :=LVIF_PARAM;
li.iSubItem:=0;
- SendMessageW(list,LVM_GETITEMW,0,lparam(@li));
- result:=li.lParam;
+ if SendMessageW(list,LVM_GETITEMW,0,lparam(@li))=0 then
+ result:=-1
+ else
+ result:=li.lParam;
end;
function LV_SetLParam(list:HWND;lParam:LPARAM;item:integer=-1):LRESULT;
|