- if ((this->sec == date2.sec) &&
- (this->min == date2.min) &&
- (this->hour == date2.hour) &&
- (this->day == date2.day) &&
- (this->month == date2.month) &&
- (this->year == date2.year)) {
- ret_val = true;
+ if (date2 != NULL) {
+ if ((this->sec == date2->sec) &&
+ (this->min == date2->min) &&
+ (this->hour == date2->hour) &&
+ (this->day == date2->day) &&
+ (this->month == date2->month) &&
+ (this->year == date2->year)) {
+ ret_val = true;
+ }