Fix a crash with custom IM protocol

Change-Id: I42268ca06ed61b987e0f15289fd29da057a7049a
2 files changed