am 5251c800: Merge "Fix potential crash in sync." into gingerbread

Merge commit '5251c800c93c6f6fd473475c36b8ab3b360c1e4d' into gingerbread-plus-aosp

* commit '5251c800c93c6f6fd473475c36b8ab3b360c1e4d':
  Fix potential crash in sync.