[PIA] Fix NPE if activity closed before render was complete. Fixes #11.