Fixed the crashing, I forget my own method returned nullptr in cases where the pixel lies outside the Layer. Oops.