title: NullPointerException in LayoutInflater inside the BaseAdapter getView() method
body: <p>Here s my getView() method. I am getting null pointer exception while inflating. There are so many answers for the same questions. This is used inside a fragment. But that doesn't suit me. </p>
  
  <pre><code>@Override
  public View getView(int position, View convertView, ViewGroup parent) {
      Context con = null;
      View vi=convertView;
      if(convertView==null){
              LayoutInflater inflater = (LayoutInflater)con.getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
              vi = inflater.inflate(R.layout.stores_listview_layout, null);
       }
  
       TextView tv = (TextView)vi.findViewById(R.id.store_name);
       tv.setText(storeData.get(position).get("merchantName"));
  
      return vi;
  }
  </code></pre>
  
  <p>What is the mistake I am doing here?</p>
  
  <p>Update: This works!</p>
  
  <pre><code>         View vi=convertView;
           Context c = null;
           if(convertView==null){
           LayoutInflater inflater = getLayoutInflater(null);
           vi = inflater.inflate(R.layout.stores_listview_layout, parent, false);
          }
  </code></pre>