Fixed a bug in Texture::copyFrom - was freeing an uninitialized pointer