title: Null Pointer Exception: Attempt to invoke virtual method on a null object reference
body: <p>Getting null pointer exception please help </p>
  
  <pre><code> protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main_appbar);
  
      toolbar=(Toolbar) findViewById(R.id.app_bar);
      setSupportActionBar(toolbar);
  
      getSupportActionBar().setDisplayShowHomeEnabled(true);
  
      NavFragment drawerFragment = (NavFragment)
              getSupportFragmentManager().findFragmentById(R.id.nav_frag);
      drawerFragment.setUp(R.id.nav_frag, (DrawerLayout) findViewById(R.id.drawerLayout), toolbar);
      listEvents= new ArrayList&lt;&gt;();
  
  
  
      Parse.enableLocalDatastore(this);
      Parse.initialize(this, "xxxxxxxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxx");
  
      //TEST PARSE
      final TextView t =(TextView) findViewById(R.id.textView);
      ParseQuery&lt;ParseObject&gt; query = ParseQuery.getQuery("Test");
      //query.whereEqualTo("playerName", "Dan Stemkoski");
      query.findInBackground(new FindCallback&lt;ParseObject&gt;() {
          public void done(List&lt;ParseObject&gt; eventList, ParseException e) {
              if (e == null) {
                  Log.d("Events", "Retrieved " + eventList.size() + " Events");
  
                  for (int i = 0; i &lt; eventList.size(); i++) {
                      Events events = new Events();
                      events.setTitle((String) eventList.get(i).get("teststr"));
                      events.setId((String) eventList.get(i).get("id"));
                      listEvents.add(events);
                  }
              } else {
                  Log.d("score", "Error: " + e.getMessage());
              }
          }
      });
  
      eventAdapter.setEventList(listEvents);
  
  
      eventsList=(RecyclerView)findViewById(R.id.list_events);
      eventsList.setLayoutManager(new LinearLayoutManager(this));
      eventAdapter= new EventAdapter(this);
      eventsList.setAdapter(eventAdapter);
  
  
  
  
  }
  </code></pre>
  
  <p>this is the place where i get the exception .. 
  logcat:</p>
  
  <blockquote>
    <p>Caused by: java.lang.NullPointerException: Attempt to invoke virtual
    method 'void
    com.squaredbytes.eventlane.EventAdapter.setEventList(java.util.ArrayList)'
    on a null object reference</p>
  </blockquote>