this NULL check, leak and copy ctor all look a bit addled

Change-Id: I5a4f80e1f6b4cc834c921d4c4780989c90cbefe2