aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.7/libstdc++-v3/libsupc++
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.7/libstdc++-v3/libsupc++')
-rw-r--r--gcc-4.7/libstdc++-v3/libsupc++/eh_globals.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc-4.7/libstdc++-v3/libsupc++/eh_globals.cc b/gcc-4.7/libstdc++-v3/libsupc++/eh_globals.cc
index 0c7f6b760..fa9b5196b 100644
--- a/gcc-4.7/libstdc++-v3/libsupc++/eh_globals.cc
+++ b/gcc-4.7/libstdc++-v3/libsupc++/eh_globals.cc
@@ -101,6 +101,14 @@ struct __eh_globals_init
~__eh_globals_init()
{
+ /* Work-around for an Android-specific bug, where this destructor
+ * is called with a NULL object pointer. This is due to a bug in the
+ * __cxa_finalize() implementation that was only fixed in 2.2.
+ */
+#ifdef __ANDROID__
+ if (this == NULL)
+ return;
+#endif
if (_M_init)
__gthread_key_delete(_M_key);
_M_init = false;