comctl32: Don't crash when getting a bad image list handle. (try 2)

Chris Robinson chris.kcat at
Mon Sep 19 11:45:03 CDT 2011

On Monday, September 19, 2011 4:09:29 PM Francois Gouget wrote:
> I prefer this construct as using IsBadReadPtr() would introduce a race
> in is_valid(). Of course calling is_valid() is in itself racy anyway. So
> I don't mind switching over if that's preferred (the code would have
> fewer lines).

Would it be feasible to keep a list or array of all pertinent HIMAGELIST 
objects, and just look up the handle in that list for validation? If it's kept 
sorted, you can even do a binary search for it instead of linear.

More information about the wine-devel mailing list