Merge "Fix the NPE for the memwriter." into jb-mr1-dev