bug #4519 Uncaught TypeError: Cannot read property 'success' of null

Signed-off-by: Marc Delisle <marc@infomarc.info>