From 8951572366b0f767566e0df8b688dbc76306eb3a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 21 Nov 2014 16:38:54 +0800 Subject: [PATCH] win: Fix crash when calling app.setName --- atom/browser/browser_win.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atom/browser/browser_win.cc b/atom/browser/browser_win.cc index 781d905792f..211a1ebf63d 100644 --- a/atom/browser/browser_win.cc +++ b/atom/browser/browser_win.cc @@ -118,8 +118,8 @@ void Browser::SetUserTasks(const std::vector& tasks) { } void Browser::SetAppUserModelID(const std::string& name) { - app_user_model_id_ = base::UTF8ToUTF16( - base::StringPrintf("atom-shell.app.%s", name)); + app_user_model_id_ = base::string16(L"atom-shell.app."); + app_user_model_id_ += base::UTF8ToUTF16(name); SetCurrentProcessExplicitAppUserModelID(app_user_model_id_.c_str()); }