Errors when EditText left blank
<p>Can anyone take a look at the below code and point out the obvious on what's wrong? The program gives an error when <code>editText</code> is left blank and only does the calculation once all the information is present. Currently the program crashes when there is text missing, why is this?</p>

<pre><code>EditText editText1, editText2;
double numA, numB, numC;
TextView answer;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.calc);

    editText1 = (EditText) findViewById(R.id.editText1);
    editText2 = (EditText) findViewById(R.id.editText2);
}

public void btnClick(View v)
{
    if(editText1.getText().length()==0)
    {
        editText1.setError("please input text"); 
    }{
        if  (editText2.getText().length()==0)
            {
                editText2.setError("please input text");
            }

    numA = new Double(editText1.getText().toString());
    numB = new Double(editText2.getText().toString());

    numC=(numA + numB); answer.setText(Double.toString(numC));
    }
}}
</code></pre>
