From 42040b3e4a9a15cc1144f49767d2099a6a628d6a Mon Sep 17 00:00:00 2001 From: Yoshito Umaoka Date: Thu, 20 Nov 2014 00:08:49 +0000 Subject: [PATCH] ICU-11389 Fixed a problem in Win32DateFormat assignment operator which triggered intltest.exe crash in u_cleanup with the recent DateFormat caching change. X-SVN-Rev: 36756 --- icu4c/source/i18n/windtfmt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/icu4c/source/i18n/windtfmt.cpp b/icu4c/source/i18n/windtfmt.cpp index 1378491a60e..9c9b57baf13 100644 --- a/icu4c/source/i18n/windtfmt.cpp +++ b/icu4c/source/i18n/windtfmt.cpp @@ -1,6 +1,6 @@ /* ******************************************************************************** -* Copyright (C) 2005-2013, International Business Machines +* Copyright (C) 2005-2014, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************** * @@ -124,7 +124,7 @@ Win32DateFormat &Win32DateFormat::operator=(const Win32DateFormat &other) // delete fCalendar; - this->fDateTimeMsg = other.fDateTimeMsg; + this->fDateTimeMsg = other.fDateTimeMsg == NULL ? NULL : new UnicodeString(*other.fDateTimeMsg); this->fTimeStyle = other.fTimeStyle; this->fDateStyle = other.fDateStyle; this->fLocale = other.fLocale; -- 2.40.0