Index: src/private_typeinfo.cpp
===================================================================
--- src/private_typeinfo.cpp	(revision 200844)
+++ src/private_typeinfo.cpp	(working copy)
@@ -388,7 +388,8 @@
     thrown_class_type->has_unambiguous_public_base(&info, adjustedPtr, public_path);
     if (info.path_dst_ptr_to_static_ptr == public_path)
     {
-        adjustedPtr = const_cast<void*>(info.dst_ptr_leading_to_static_ptr);
+        if (adjustedPtr != NULL)
+            adjustedPtr = const_cast<void*>(info.dst_ptr_leading_to_static_ptr);
         return true;
     }
     return false;
Index: test/catch_ptr_02.cpp
===================================================================
--- test/catch_ptr_02.cpp	(revision 200844)
+++ test/catch_ptr_02.cpp	(working copy)
@@ -33,7 +33,7 @@
 {
     try
      {
-    	throw &a;
+        throw &a;
         assert(false);
     }
     catch ( A* )
@@ -77,10 +77,48 @@
     }
 }
 
+struct base1 {int x;};
+struct base2 {int x;};
+struct derived : base1, base2 {};
+
+void test5 ()
+{
+    try
+    {
+        throw (derived*)0;
+        assert(false);
+    }
+    catch (base2 *p) {
+        assert (p == 0);
+    }
+    catch (...)
+    {
+        assert (false);
+    }
+}
+
+void test6 ()
+{
+    try
+    {
+        throw (derived*)12;
+        assert(false);
+    }
+    catch (base2 *p) {
+        assert ((unsigned long)p == 12+sizeof(base1));
+    }
+    catch (...)
+    {
+        assert (false);
+    }
+}
+
 int main()
 {
     test1();
     test2();
     test3();
     test4();
+    test5();
+    test6();
 }
