diff options
| author | garyscavone <garyscavone@users.noreply.github.com> | 2014-11-03 13:40:05 -0500 |
|---|---|---|
| committer | garyscavone <garyscavone@users.noreply.github.com> | 2014-11-03 13:40:05 -0500 |
| commit | 8dffd235a364ab6ce1b3acf27a8fe1f0c2a288a2 (patch) | |
| tree | e1f3b6fdf20d824a35df4ea07dbaf05b338b7283 /RtAudio.cpp | |
| parent | 626dd78364d922be62ffa2cc660a494e3b57b200 (diff) | |
| parent | 554c6c5035588852c98b10805a31ee5ba665721a (diff) | |
Merge pull request #29 from tmatth/static_analysis_fixes
Static analysis fixes
Diffstat (limited to 'RtAudio.cpp')
| -rw-r--r-- | RtAudio.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/RtAudio.cpp b/RtAudio.cpp index a896e5d..ed319a4 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -180,7 +180,7 @@ RtAudio :: RtAudio( RtAudio::Api api ) getCompiledApi( apis );
for ( unsigned int i=0; i<apis.size(); i++ ) {
openRtApi( apis[i] );
- if ( rtapi_->getDeviceCount() ) break;
+ if ( rtapi_ && rtapi_->getDeviceCount() ) break;
}
if ( rtapi_ ) return;
@@ -6816,6 +6816,7 @@ RtAudio::DeviceInfo RtApiAlsa :: getDeviceInfo( unsigned int device ) // Count cards and devices
card = -1;
+ subdevice = -1;
snd_card_next( &card );
while ( card >= 0 ) {
sprintf( name, "hw:%d", card );
|
