Skip to content

Commit

Permalink
Merge pull request #5263 from armadillu/bugFix/ofThreadDetach
Browse files Browse the repository at this point in the history
Fix for #5262 - Short lived threads can cause exceptions
  • Loading branch information
arturoc authored Sep 20, 2016
2 parents 007336b + 856a51a commit 58508e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/openFrameworks/utils/ofThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ void ofThread::run(){
}catch(...){
ofLogFatalError("ofThreadErrorLogger::exception") << "Unknown exception.";
}
thread.detach();
try{
thread.detach();
}catch(...){}
#ifdef TARGET_ANDROID
attachResult = ofGetJavaVMPtr()->DetachCurrentThread();
#endif
Expand Down

0 comments on commit 58508e9

Please sign in to comment.