Please just write `if (tiles) {`, the comparison with NULL is superfluous in C++.