|  | @@ -89,18 +89,30 @@ public class RctManager {
 | 
	
		
			
			| 89 | 89 |          final ReactInstanceDevCommandsHandler devInterface = (ReactInstanceDevCommandsHandler)
 | 
	
		
			
			| 90 | 90 |                  ReflectionUtils.getDeclaredField(reactInstanceManager, "mDevInterface");
 | 
	
		
			
			| 91 | 91 |          if (devInterface == null) {
 | 
	
		
			
			| 92 |  | -            Log.e(TAG, "Could not get field: mDevInterface");
 | 
	
		
			
			|  | 92 | +            Log.e(TAG, "Could not get field mDevInterface");
 | 
	
		
			
			| 93 | 93 |              return;
 | 
	
		
			
			| 94 | 94 |          }
 | 
	
		
			
			| 95 | 95 |  
 | 
	
		
			
			| 96 | 96 |          // Create customDevCommandsHandler
 | 
	
		
			
			| 97 | 97 |          CustomDevCommandsHandler customDevCommandsHandler = new CustomDevCommandsHandler(devInterface);
 | 
	
		
			
			| 98 |  | -        ReflectionUtils.setField(reactInstanceManager, "mDevInterface", customDevCommandsHandler);
 | 
	
		
			
			|  | 98 | +        boolean success = ReflectionUtils.setField(reactInstanceManager, "mDevInterface", customDevCommandsHandler);
 | 
	
		
			
			|  | 99 | +        if (!success) {
 | 
	
		
			
			|  | 100 | +            Log.e(TAG, "Could not set field mDevInterface");
 | 
	
		
			
			|  | 101 | +            return;
 | 
	
		
			
			|  | 102 | +        }
 | 
	
		
			
			| 99 | 103 |  
 | 
	
		
			
			| 100 | 104 |          // Set customDevCommandsHandler in devSupportManager. Fun =).
 | 
	
		
			
			| 101 | 105 |          DevSupportManager devSupportManager = (DevSupportManager)
 | 
	
		
			
			| 102 | 106 |                  ReflectionUtils.getDeclaredField(reactInstanceManager, "mDevSupportManager");
 | 
	
		
			
			| 103 |  | -        ReflectionUtils.setField(devSupportManager, "mReactInstanceCommandsHandler", customDevCommandsHandler);
 | 
	
		
			
			|  | 107 | +        if (devSupportManager == null) {
 | 
	
		
			
			|  | 108 | +            Log.e(TAG, "Could not get field mDevSupportManager");
 | 
	
		
			
			|  | 109 | +            return;
 | 
	
		
			
			|  | 110 | +        }
 | 
	
		
			
			|  | 111 | +
 | 
	
		
			
			|  | 112 | +        success = ReflectionUtils.setField(devSupportManager, "mReactInstanceCommandsHandler", customDevCommandsHandler);
 | 
	
		
			
			|  | 113 | +        if (!success) {
 | 
	
		
			
			|  | 114 | +            Log.e(TAG, "Could not set field mReactInstanceCommandsHandler");
 | 
	
		
			
			|  | 115 | +        }
 | 
	
		
			
			| 104 | 116 |      }
 | 
	
		
			
			| 105 | 117 |  
 | 
	
		
			
			| 106 | 118 |      public <T extends ReactContextBaseJavaModule> T getNativeModule(Class<T> nativeModuleClass) {
 |