title: Android - Failure to get image from camera intent on 4.2.2
body: <p>I'm trying to take photo and than get file path by calling:</p>
  
  <pre><code>Intent camera_intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  startActivityForResult(camera_intent, Static.TAKE_PICTURE);
  </code></pre>
  
  <p>and than:</p>
  
  <pre><code>case Static.TAKE_PICTURE:
  if(resultCode == Activity.RESULT_OK){  
      if(data.getData() != null){
          Uri selectedImage = data.getData();
          String path = selectedImage.getPath();
          if(path.contains("images/media")){
              path = Static.getImageRealPathFromURI(getActivity().getBaseContext(),selectedImage);
          }
      }
  }
  break;
  </code></pre>
  
  <p>working fine on 4.1.2 Galaxy S3, but crashes every time on 4.2.2 Nexus 10 with:</p>
  
  <pre><code>java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65642, result=-1, data=null} to activity {com.******.***/com.******.***.Main}: java.lang.NullPointerException
  </code></pre>
  
  <p>If I try do the same for Video:</p>
  
  <pre><code>Intent video_intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
  startActivityForResult(video_intent, Static.RECORD_VIDEO);
  </code></pre>
  
  <p>works fine. Really I don't have idea why.</p>