mirror of
https://github.com/boostorg/regex.git
synced 2025-07-05 16:46:31 +02:00
Added check to verify that we have something to clean up before calling do_free
[SVN r18075]
This commit is contained in:
@ -503,7 +503,7 @@ w32_regex_traits<char>::~w32_regex_traits()
|
||||
#endif
|
||||
// add reference to static member here to ensure
|
||||
// that the linker includes it in the .exe:
|
||||
if((--entry_count == 0) && (0 != &w32_regex_traits<char>::i))
|
||||
if((--entry_count == 0) && (0 != &w32_regex_traits<char>::i) && is_init)
|
||||
do_free();
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
g.acquire(false);
|
||||
@ -672,7 +672,7 @@ w32_regex_traits<wchar_t>::~w32_regex_traits()
|
||||
#endif
|
||||
// add reference to static member here to ensure
|
||||
// that the linker includes it in the .exe:
|
||||
if((--entry_count == 0) && (0 != &w32_regex_traits<wchar_t>::init_))
|
||||
if((--entry_count == 0) && (0 != &w32_regex_traits<wchar_t>::init_) && is_init)
|
||||
do_free();
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
g.acquire(false);
|
||||
|
Reference in New Issue
Block a user