What Violation? 1

What bug does this code have?

// Thread 1
if (ptr != nullptr) {
    ptr->process();
}

// Thread 2
delete ptr;
ptr = nullptr;