Skip to content

Commit

Permalink
exit crash fix?
Browse files Browse the repository at this point in the history
I was experiencing an exit crash using the latest SDK.  The Leap thread was not closing properly.
  • Loading branch information
Jason Walters committed Mar 31, 2013
1 parent 36bf8b9 commit dbf9841
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ofxLeapMotion/src/ofxLeapMotion.h
Expand Up @@ -79,13 +79,17 @@ class ofxLeapMotion : public Listener{

~ofxLeapMotion(){
//note we don't delete the controller as it causes a crash / mutex exception.
close();
/// close(); /// JRW - we do not need this
}

void close(){
if( ourController ){
ourController->removeListener(*this);
}

/// JRW - let's delete our Leap controller
/// call close() on app exit
delete ourController;
}

//--------------------------------------------------------------
Expand Down

0 comments on commit dbf9841

Please sign in to comment.