File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
javasdk/NRSDK/addons/com/neuronrobotics/sdk/javaxusb Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -481,8 +481,10 @@ private void localDisconnect(){
481481 try {
482482 if (camInpipe !=null )
483483 camInpipe .close ();
484+ camInpipe =null ;
484485 if (camOutpipe !=null )
485486 camOutpipe .close ();
487+ camOutpipe =null ;
486488 } catch (UsbNotActiveException | UsbNotOpenException
487489 | UsbDisconnectedException | UsbException e1 ) {
488490 // TODO Auto-generated catch block
@@ -493,6 +495,7 @@ private void localDisconnect(){
493495 if (dataInterface .isClaimed ()){
494496 try {
495497 dataInterface .release ();
498+ dataInterface =null ;
496499 } catch (UsbNotActiveException |
497500 UsbDisconnectedException
498501 | UsbException e ) {
@@ -506,6 +509,7 @@ private void localDisconnect(){
506509 //LibUsb.attachKernelDriver(deviceHandle, interfaceNumber);
507510 try {
508511 LibUsb .close (deviceHandle );
512+ deviceHandle =null ;
509513 }catch (IllegalStateException e ){
510514 e .printStackTrace ();
511515 }
You can’t perform that action at this time.
0 commit comments