I have a code like shown below
if ((client == NULL) || (client->type == Leave_Agent)) {
but when i changed it with following code i am getting errors in event logs
the modified code is shown below
if (((client == NULL)|| (client->type == Leave_Agent)) && (client->type == 0)) {
errors in event log is
Faulting application name: test.exe, version: 8.0.16.0, time stamp: 0x5036427e
Can any body guide me how to fix this, which stopping my application.The && operator will make any issues in c++ ?
I think you wanted to move the () around so that you never dereference the pointer if it’s NULL: