```c++
if (!mesh)
    return;
```
would make clear what happens, if there is no mesh (and reduce indentation too).