title: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=intent} to activity
body: <p>In my app I hit a button called Pick Photo and it loads the gallery. When I click an image in the gallery, the app force closes and in my logcat I receive the following:</p>
  
  <pre><code>    java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://media/external/images/media/3369 (has extras) }} to activity {cap.shot/cap.shot.LolcatActivity}: java.lang.NullPointerException
      at android.app.ActivityThread.deliverResults(ActivityThread.java:2655)
      at android.app.ActivityThread.handleSendResult(ActivityThread.java:2697)
      at android.app.ActivityThread.access$2000(ActivityThread.java:124)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:998)
      at android.os.Handler.dispatchMessage(Handler.java:99)
      at android.os.Looper.loop(Looper.java:130)
      at android.app.ActivityThread.main(ActivityThread.java:3806)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:507)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
      at dalvik.system.NativeStart.main(Native Method)
      Caused by: java.lang.NullPointerException
      at cap.shot.LolcatView.loadFromUri(LolcatView.java:137)
      at cap.shot.LolcatActivity.loadPhoto(LolcatActivity.java:384)
      at cap.shot.LolcatActivity.onActivityResult(LolcatActivity.java:299)
      at android.app.Activity.dispatchActivityResult(Activity.java:3988)
      at android.app.ActivityThread.deliverResults(ActivityThread.java:2651)
  </code></pre>
  
  <p>My lolcatactivity.java is available here: <a href="http://pastebin.com/AVL8CswT" rel="noreferrer">http://pastebin.com/AVL8CswT</a>
  My lolcatview.java is available here: <a href="http://pastebin.com/vD7vCBgY" rel="noreferrer">http://pastebin.com/vD7vCBgY</a></p>
  
  <p>Thank you!</p>