From efd796743d569832aec83362f8311327247766e2 Mon Sep 17 00:00:00 2001 From: Matthew Lake <MasterR_L@yahoo.com> Date: Tue, 1 Aug 2000 23:30:25 +0000 Subject: [PATCH] Fixed a segfault problem using the standard file open dialog box. --- dlls/comctl32/listview.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index bfe5d2d5449..6ef2fefd2c2 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -1938,7 +1938,7 @@ static BOOL LISTVIEW_SetItem(HWND hwnd, LPLVITEMA lpLVItem) if (lpLVItem->iSubItem == 0) { hdpaSubItems = (HDPA)DPA_GetPtr(infoPtr->hdpaItems, lpLVItem->iItem); - if (hdpaSubItems != NULL) + if (hdpaSubItems != NULL && hdpaSubItems != -1) { lpItem = (LISTVIEW_ITEM *)DPA_GetPtr(hdpaSubItems, lpLVItem->iSubItem); if (lpItem != NULL) @@ -5085,7 +5085,7 @@ static LRESULT LISTVIEW_GetStringWidthA(HWND hwnd, LPCSTR lpszText) HDC hdc; ZeroMemory(&stringSize, sizeof(SIZE)); - if (lpszText != NULL) + if (lpszText != NULL && lpszText != -1) { hFont = infoPtr->hFont ? infoPtr->hFont : infoPtr->hDefaultFont; hdc = GetDC(hwnd); -- GitLab