Skip to content

Commit

Permalink
Don't connect to any device if URI cannot be resolved
Browse files Browse the repository at this point in the history
Fixes OpenNI#35.
  • Loading branch information
mintar committed Dec 21, 2016
1 parent c60a46c commit ebfc45e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/openni2_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,10 +716,11 @@ std::string OpenNI2Driver::resolveDeviceURI(const std::string& device_id) throw(
}
}
}
return matched_uri;
if (match_found)
return matched_uri;
else
return "INVALID";
}

return "INVALID";
}

void OpenNI2Driver::initDevice()
Expand Down

0 comments on commit ebfc45e

Please sign in to comment.