Why will the following line crash my Android app?
<p>The following line, no mather where placed where will crash my Android program.</p>

<pre><code>EditText editText1;
double pro = Double.parseDouble(editText1.getText().toString());
</code></pre>

<p>Additional code:</p>

<pre><code> &lt;EditText
        android:id="@+id/editText1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/btsub"
        android:layout_marginTop="58dp"
        android:ems="10"
        android:inputType="number" &gt;

        &lt;requestFocus /&gt;
    &lt;/EditText&gt;
</code></pre>

<p>What am I doing wrong? I am not experieced with debugging.</p>

<p>EDIT--</p>

<p>The following will show a toast containing: "Something is real wrong"</p>

<pre><code>try {
                    if(editText1 != null) {
                        pro = Double.parseDouble(editText1.getText().toString());
                    } else {
                        Context context = getApplicationContext();
                        CharSequence text = "Something real wrong";
                        int duration = Toast.LENGTH_SHORT;

                        Toast toast = Toast.makeText(context, text, duration);
                        toast.show();
                    }
                } catch(NumberFormatException e) {
                    Context context = getApplicationContext();
                    CharSequence text = "Empty";
                    int duration = Toast.LENGTH_SHORT;

                    Toast toast = Toast.makeText(context, text, duration);
                    toast.show();
                }
</code></pre>
