Hi,
I suppose, the CSideStructure->CSideString is not really empty. The implementation of EwNewStringAnsi() checks the given string whether it is empty or not and in the first case returns NULL. I just verified this in a simple example.
To be sure you can add following condition to your code:
if ( CSideStructure->CSideString && *CSideStructure->CSideString )
EwRetainString( &_this->ChoraSideStructure->ChoraSideString,
EwNewStringAnsi( CSideStructure->CSideString ));
Does the additional condition help? If not, the ANSI C string is not empty.
Another idea: are you using multiple threads in your projects? If yes, do you perform the above operation in context of a thread other than the GUI thread?
Best regards
Paul Banach