rtaudio: avoid NULL dereference
authorTristan Matthews <le.businessman@gmail.com>
Sun, 2 Nov 2014 04:56:12 +0000 (00:56 -0400)
committerTristan Matthews <le.businessman@gmail.com>
Sun, 2 Nov 2014 05:02:08 +0000 (01:02 -0400)
RtAudio.cpp

index 7bc009d1df58a4fe28a787416025d8c23e426c6d..e9f7271c497b5c0121e2ec8bc9773ba924fea880 100644 (file)
@@ -179,7 +179,7 @@ RtAudio :: RtAudio( RtAudio::Api api )
   getCompiledApi( apis );\r
   for ( unsigned int i=0; i<apis.size(); i++ ) {\r
     openRtApi( apis[i] );\r
-    if ( rtapi_->getDeviceCount() ) break;\r
+    if ( rtapi_ && rtapi_->getDeviceCount() ) break;\r
   }\r
 \r
   if ( rtapi_ ) return;\r