android 4.0 toast.cancel() don't work well
<p>In my app,I want to cancel the old toast ,and show the new toast.But it dont work well .</p>

<pre><code>                             Handler postHandler = new Handler();     
                        postHandler.post(new Runnable() {  
                            @Override  
                            public void run() {  

                                    if (toast != null) {  
                                        toast.cancel();
                                toast.maketext(this,"new toast",Toast.LENGTH_LONG);



                                    } 
                                    toast.show();  

                            }  
                        });  


                return false;
            }
        });
</code></pre>

<p>but  nothing  shown .</p>

<p>The logcat shows:</p>

<pre><code>E/AndroidRuntime( 6706): FATAL EXCEPTION: main
E/AndroidRuntime( 6706): java.lang.NullPointerException
E/AndroidRuntime( 6706):        at android.view.View.onAttachedToWindow(View.java:9533)
E/AndroidRuntime( 6706):        at android.view.View.dispatchAttachedToWindow(View.java:9786)
E/AndroidRuntime( 6706):        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2198)
E/AndroidRuntime( 6706):        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:957)
E/AndroidRuntime( 6706):        at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2453)
E/AndroidRuntime( 6706):        at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 6706):        at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 6706):        at android.app.ActivityThread.main(ActivityThread.java:4424)
E/AndroidRuntime( 6706):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 6706):        at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 6706):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/AndroidRuntime( 6706):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/AndroidRuntime( 6706):        at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager(  183):   Force finishing activity com.rk.youming/.Testsurfacevie
</code></pre>
