Have you even tried your code on purposely broken rtf? How does it handle it?
Broken rtf can only possibly break the RTF reader code, although it has not been happening for quite a long time. And the asserts are there to report Wine riched20 developer's errors, not the app developers'.
-- Ph.