diff --git a/ActiveSync/SOGoActiveSyncDispatcher.m b/ActiveSync/SOGoActiveSyncDispatcher.m
index ebac5f69f..c4b6e2dfb 100644
--- a/ActiveSync/SOGoActiveSyncDispatcher.m
+++ b/ActiveSync/SOGoActiveSyncDispatcher.m
@@ -3992,14 +3992,15 @@ void handle_eas_terminate(int signum)
}
xml = [NSString stringWithFormat: @"<%@ xmlns=\"ComposeMail:\">%@%@>", cmdName, [s stringByEncodingBase64], cmdName];
-
-
-
d = [xml dataUsingEncoding: NSASCIIStringEncoding];
}
else
{
- d = [[theRequest content] wbxml2xml];
+ // Handle empty Ping request, no need to try decoding the WBXML blob here
+ if ([[theRequest content] length])
+ d = [[theRequest content] wbxml2xml];
+ else
+ d = nil;
}
documentElement = nil;