Don't attempt opening devices if none are connected

Fixes a small issue that makes the sample app crash if started without any connected openni devices.
This is because showAlertAndExit is executed asynchronously, execution continues past the "if" even when it evaluates to true.