From cbd1210337f187c6e7a478f851a95781b07303b6 Mon Sep 17 00:00:00 2001 From: gibbed Date: Sat, 6 Jun 2015 19:32:47 -0500 Subject: [PATCH] Handle a NULL playlist name pointer when creating title playlist. --- src/xenia/kernel/apps/xmp_app.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/xenia/kernel/apps/xmp_app.cc b/src/xenia/kernel/apps/xmp_app.cc index 9c9d309b8..a77ee0d17 100644 --- a/src/xenia/kernel/apps/xmp_app.cc +++ b/src/xenia/kernel/apps/xmp_app.cc @@ -297,8 +297,13 @@ X_RESULT XXMPApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr, xe::store_and_swap( memory_->TranslateVirtual(playlist_handle_ptr), storage_ptr); assert_true(xmp_client == 0x00000002); - auto playlist_name = xe::load_and_swap( + std::wstring playlist_name; + if (!playlist_name_ptr) { + playlist_name = L""; + } else { + playlist_name = xe::load_and_swap( memory_->TranslateVirtual(playlist_name_ptr)); + } // dummy_alloc_ptr is the result of a XamAlloc of storage_size. assert_true(storage_size == 4 + song_count * 128); return XMPCreateTitlePlaylist(songs_ptr, song_count, playlist_name_ptr,