Diff between 4b21e1aa7621206ed7a4a83ad8f375c848bb72fa and c63b4808e8a07d346567ca0a18320a3248df8bbb

Changed Files

File Additions Deletions Status
android/client/if-sco.c +6 -4 modified

Full Patch

diff --git a/android/client/if-sco.c b/android/client/if-sco.c
index c33b012..7a89692 100644
--- a/android/client/if-sco.c
+++ b/android/client/if-sco.c
@@ -473,16 +473,18 @@ static void stop_p(int argc, const char **argv)
 		return;
 	}
 
+	if (stream_out) {
+		pthread_mutex_lock(&outstream_mutex);
+		stream_out->common.standby(&stream_out->common);
+		pthread_mutex_unlock(&outstream_mutex);
+	}
+
 	current_state = STATE_STOPPING;
 	pthread_mutex_unlock(&state_mutex);
 
 	pthread_join(play_thread, NULL);
 	play_thread = 0;
 
-	pthread_mutex_lock(&outstream_mutex);
-	stream_out->common.standby(&stream_out->common);
-	pthread_mutex_unlock(&outstream_mutex);
-
 	haltest_info("Ended %s\n", __func__);
 }