On Mon, Aug 2, 2010 at 10:50 AM, Nikolay Sivov nsivov@codeweavers.com wrote:
Ok, this test is present already cause Desktop list is an empty list. So please change this test for mkid.cb magic value to _ILIsEmpty() in BindToObject() and all other occurrences too (InitializeTreeView() for example).
Is something like the attached patch acceptable? I have only changed the checks where it would not introduce an extra check for NULL, and I have also not touched debughlp.c. Should I be more radical and also change places that only checks pidl->mkid.cb?
Also, the check in _ILIsDesktop() seems a bit counter-intuitive to me (interpreting it as "pidl && (pidl->mkid.cb ? FALSE : TRUE)" is closer to what you would expect as the current version also considers NULL pidl's to be the desktop (or empty)), but I assume that the current meaning is the intended one.