If I come across old code that does if (!this) return;
in an app, how severe a risk is this? Is it a dangerous ticking time bomb that requires an immediate app-wide
In this case I'd suggest removing the NULL check from the member function and create a non-member function
CThingy* SafeLookup(CLookupThing *lookupThing) {
if (lookupThing == NULL) {
return NULL;
} else {
return lookupThing->Lookup();
}
}
Then it should be easy enough to find every call to the Lookup
member function and replace it with the safe non-member function.