Fix NPE in mainframe

Change-Id: I8162db2502af5e6c39825b57fe194d6fda8ab3ed
Reviewed-on: http://gerrit.dmdirc.com/2969
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>