Merge "Make sure path is not NULL to avoid fatal exception."

am: e0e5bfeb3c

* commit 'e0e5bfeb3c49419ceb53d2ea2b7410ddcfab35c5':
  Make sure path is not NULL to avoid fatal exception.
gugelfrei
Jeff Sharkey 9 years ago committed by android-build-merger
commit de629f105e

@ -283,8 +283,8 @@ void VolumeManager::handleBlockEvent(NetlinkEvent *evt) {
evt->dump();
}
std::string eventPath(evt->findParam("DEVPATH"));
std::string devType(evt->findParam("DEVTYPE"));
std::string eventPath(evt->findParam("DEVPATH")?evt->findParam("DEVPATH"):"");
std::string devType(evt->findParam("DEVTYPE")?evt->findParam("DEVTYPE"):"");
if (devType != "disk") return;

Loading…
Cancel
Save