Fix getTimestamp if offload thread is not initialized.

Returns INVALID_OPERATION.

Bug: 18605649
Change-Id: I440fb687fbf9249098e049982fa83bcd1515fd80
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 08d9eb1..dab6d91 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -2688,7 +2688,8 @@
     if (mNormalSink != 0) {
         return mNormalSink->getTimestamp(timestamp);
     }
-    if ((mType == OFFLOAD || mType == DIRECT) && mOutput->stream->get_presentation_position) {
+    if ((mType == OFFLOAD || mType == DIRECT)
+            && mOutput != NULL && mOutput->stream->get_presentation_position) {
         uint64_t position64;
         int ret = mOutput->stream->get_presentation_position(
                                                 mOutput->stream, &position64, &timestamp.mTime);