```
if (!idx.isValid ())
    return;
```