Yeah, I think I might get rid of the flag entirely, and just check whether the buffer is null.  It'll do the same thing.