On 9/19/2011 20:45, Chris Robinson wrote:
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 preferre
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).
On Mon, 19 Sep 2011, Nikolay Sivov wrote:
[...]
> > static inline BOOL is_valid(HIMAGELIST himl)
> > {
> > -return himl&& himl->lpVtbl ==&ImageListImpl_Vtbl;
> > +BOOL valid;
> > +__TRY
> > +{
> > +valid = himl&& himl->lpVtbl ==&ImageListImpl_Vtbl;
> > +}
> > +
On 9/19/2011 17:32, Francois Gouget wrote:
---
Don't return from inside the block this time.
dlls/comctl32/imagelist.c | 13 -
dlls/comctl32/tests/imagelist.c | 17 +++--
2 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/imagelis
Francois Gouget writes:
> @@ -3587,7 +3588,15 @@ static const IImageListVtbl ImageListImpl_Vtbl = {
>
> static inline BOOL is_valid(HIMAGELIST himl)
> {
> -return himl && himl->lpVtbl == &ImageListImpl_Vtbl;
> +__TRY
> +{
> +return himl && himl->lpVtbl == &ImageListImpl_Vt