PlatformCALayer ::replaceSublayer occasionally crashes because the current layer doesn't have a superlayer. I believe this is a benign case that happens when we are restructuring the tree. But currently it crashes. I will add protection against the null pointer and see if this avoids any other problems.
rdar://problem/8751147
Created attachment 92290 [details] Patch
Comment on attachment 92290 [details] Patch You could leave the assertion in since it would be nice to know when this happens.
Committed r85781: <http://trac.webkit.org/changeset/85781>