Posted By: Aku_Aku
[SOLVED] Detecting invalid pointer - 06/16/20 17:23
Hi!
My program creates a TEXT object like this:
In one case the object doesn't get strings, it remains in original state.
But, in this case when the control flow reaches this statement:
I get W1501 Invalid pointer message.
I assume a pointer is uninitialized. How can I detect this case?
My program creates a TEXT object like this:
Code
TEXT* text_lines; text_lines = txt_create(100,0);
In one case the object doesn't get strings, it remains in original state.
But, in this case when the control flow reaches this statement:
Code
if(NULL == (text_lines->pstring)[line_number])
I get W1501 Invalid pointer message.
I assume a pointer is uninitialized. How can I detect this case?