It persists in Windows, yes. Haven't tested Wine, where do you see a crash?
In crypt32. I wrote a quick test program that does what your patch does, and it crashes adding the certificate to the root store. I'll send a patch shortly that'll avoid the crash. Nevertheless, this won't do what you want in Wine: the root store is read-only in Wine. --Juan