Skip to content

Commit 68a7d51

Browse files
Fix incorrect IntPtr null check
1 parent 05262a4 commit 68a7d51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Ookii.Dialogs.Wpf/VistaFolderBrowserDialog.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,13 @@ private bool RunDialogDownlevel(IntPtr owner)
232232
}
233233
finally
234234
{
235-
if( rootItemIdList != null )
235+
if( rootItemIdList != IntPtr.Zero )
236236
{
237237
IMalloc malloc = NativeMethods.SHGetMalloc();
238238
malloc.Free(rootItemIdList);
239239
Marshal.ReleaseComObject(malloc);
240240
}
241-
if( resultItemIdList != null )
241+
if( resultItemIdList != IntPtr.Zero )
242242
{
243243
Marshal.FreeCoTaskMem(resultItemIdList);
244244
}

0 commit comments

Comments
 (0)