title: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { (has extras) }} to activity; java.lang.NullPointerException
body: <p>Im creating Triggers and Action Application for my Final Year Project,</p>
  
  <p>I return a child Activity result to intermediate activity and ther add some data to that activity and send it again to main activity, </p>
  
  <p>I did for both Trigger sub module and Action sub module, both like same coding....</p>
  
  <p>trigger module is working perfectly, but when action module run application is force stopped</p>
  
  <p>and error is</p>
  
  <pre><code>E/AndroidRuntime(5104): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { (has extras) }} to activity {mani.droid.mechanize/mani.droid.mechanize.ActionListActivity}: java.lang.NullPointerException
  </code></pre>
  
  <p><strong>Child onActivityResult</strong></p>
  
  <pre><code>public void onSave(View v)
  {
      if(txtNum.length() != 0)
      {
          String strTmp = null;
          Intent resultInt = new Intent();
          strTmp = txtNum.getText().toString();
          resultInt.putExtra("Num", strTmp);
          resultInt.putExtra("SubName", strTmp);
          setResult(Activity.RESULT_OK, resultInt);
          finish();
      }
      else
          Toast.makeText(getApplicationContext(), "Please enter number or choose from contact", Toast.LENGTH_SHORT).show();
  }
  </code></pre>
  
  <p><strong>Intermediate onActivityResult</strong></p>
  
  <pre><code>//getting result from other activity and sending to action list activity
  @Override
  public void onActivityResult(int reqCode, int resultCode, Intent data) {
      super.onActivityResult(reqCode, resultCode, data);
      if(resultCode == Activity.RESULT_OK)
      {
          switch(reqCode)
          {
              case 1:
                      data.putExtra("ActionName", txtAction);
                      setResult(Activity.RESULT_OK, data);
                      finish();
                      break;
          }
      }
  }
  </code></pre>
  
  <p><strong>Main onActivityResult</strong></p>
  
  <pre><code>//Getting Trigger parameters and adding to list
  @Override
  public void onActivityResult(int reqCode, int resultCode, Intent data) {
      super.onActivityResult(reqCode, resultCode, data);
      if(resultCode == Activity.RESULT_OK)
      {
          switch(reqCode)
          {
              case 1:
                  if (data.equals(null))
                  {
                      Toast.makeText(context, "Intent is Null", Toast.LENGTH_SHORT).show();
                  }
                  else
                  {
                      //String actName = data.getStringExtra("ActionName");
                      String subName = data.getStringExtra("SubName");
                      Toast.makeText(context, subName, Toast.LENGTH_SHORT).show();
                  }
                  break;
          }
      }
  } 
  </code></pre>