if the source ANSI string was an empty string (""), the function EwNewStringAnsi() returns the value NULL, which in Embedded Wizard is valid to represent an empty string. See also the section Be careful when exchanging strings.
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 )
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?
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!