null pointer exception help in quake2 bot launcher
<p>I am trying to get this bot launcher working for quake2 It gives me an error at line 342 any help is appreciated. I am new to java but have other programing knowledge. I think it has something to do with the initialization of one of the variables on line 342</p>

<pre><code>Exception in thread "main" java.lang.NullPointerException
        at ZigFrm.getPlayerDat(Zigl.java:342)
        at ZigFrm.&lt;init&gt;(Zigl.java:90)
        at Zigl.main(Zigl.java:39)

     public void getPlayerDat()
            {
/* 327*/        String s = Qpath + "/3zb2/players";
/* 328*/        String s1 = Qpath + "/baseq2/players";
/* 330*/        lstModels = new Hashtable();
/* 332*/        File file = new File(s);
/* 333*/        File file1 = new File(s1);
/* 336*/        String as[] = file.list(new FFilter(1));
/* 337*/        String as1[] = file1.list(new FFilter(1));
/* 339*/        HashSet hashset = new HashSet();
/* 342*/        for(int i = 0; i &lt; as.length; i++)
                {
/* 343*/            hashset.add(as[i]);
/* 344*/            TreeSet treeset = new TreeSet();
/* 345*/            File file2 = new File(s + "/" + as[i]);
/* 346*/            String as3[] = file2.list(new FFilter(0, ".pcx"));
/* 347*/            for(int l = 0; l &lt; as3.length; l++)
                    {
/* 348*/                String s2 = as3[l].toLowerCase();
/* 349*/                if(!s2.endsWith("_i.pcx") &amp;&amp; !s2.equals("weapon.pcx"))
/* 350*/                    treeset.add(as3[l].substring(0, as3[l].length() - 4));
                    }

/* 352*/            lstModels.put(as[i], treeset);
                }

/* 356*/        for(int j = 0; j &lt; as1.length; j++)
                {
/* 357*/            hashset.add(as1[j]);
/* 359*/            TreeSet treeset1 = (TreeSet)lstModels.get(as1[j]);
/* 360*/            if(treeset1 == null)
/* 360*/                treeset1 = new TreeSet();
/* 361*/            File file3 = new File(s1 + "/" + as1[j]);
/* 362*/            String as4[] = file3.list(new FFilter(0, ".pcx"));
/* 363*/            for(int i1 = 0; i1 &lt; as4.length; i1++)
                    {
/* 364*/                String s3 = as4[i1].toLowerCase();
/* 365*/                if(!s3.endsWith("_i.pcx") &amp;&amp; !s3.equals("weapon.pcx"))
/* 366*/                    treeset1.add(as4[i1].substring(0, as4[i1].length() - 4));
                    }

/* 368*/            lstModels.put(as1[j], treeset1);
                }

/* 372*/        Iterator iterator = hashset.iterator();
/* 373*/        if(hashset.size() &gt; 0)
                {
/* 374*/            String as2[] = new String[hashset.size()];
/* 375*/            for(int k = 0; k &lt; hashset.size(); k++)
/* 376*/                as2[k] = (String)iterator.next();

/* 378*/            bcMSList.setListData(as2);
                } else
                {
/* 380*/            bcMSList.removeAll();
                }
/* 326*/        /* return; */
            }
</code></pre>
