am 96e6ddb2: fix Gallery crashes with empty PTP device

* commit '96e6ddb24dd149aa991ef007a394ea9592066d14':
  fix Gallery crashes with empty PTP device