Uninitialized pointer can cause crash.

mpAudioTrack should be initialized in any case.
If getOutputSamplingRate returns ERROR, this won't be initialized.
As a result, deleting this field in dtor can cause crash.

Change-Id: I950d353361b19635302339dac35752a2514d2d80
Signed-off-by: You Kim <you.kim72@gmail.com>
diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp
index 253602d..a1c7734 100644
--- a/media/libmedia/ToneGenerator.cpp
+++ b/media/libmedia/ToneGenerator.cpp
@@ -803,6 +803,7 @@
     ALOGV("ToneGenerator constructor: streamType=%d, volume=%f", streamType, volume);
 
     mState = TONE_IDLE;
+    mpAudioTrack = NULL;
 
     if (AudioSystem::getOutputSamplingRate(&mSamplingRate, streamType) != NO_ERROR) {
         ALOGE("Unable to marshal AudioFlinger");
@@ -811,7 +812,6 @@
     mThreadCanCallJava = threadCanCallJava;
     mStreamType = streamType;
     mVolume = volume;
-    mpAudioTrack = NULL;
     mpToneDesc = NULL;
     mpNewToneDesc = NULL;
     // Generate tone by chunks of 20 ms to keep cadencing precision