]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Resolve 'dying from an unhandled exception: c'
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 2 May 2014 07:49:18 +0000 (00:49 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 2 May 2014 07:49:18 +0000 (00:49 -0700)
CbcPointer<> is used from code outside of Job protection where it is
safe to use Must(). In order to get a useful backtrace we need to assert
immediately at the point of failure. Particularly necessary since these
are in generic operators used "everywhere" in the code.

src/base/CbcPointer.h

index 51c86b125e29ab3c380b431a79b1935bdf0f3b93..3bed8db2aae112acb80130d997aeb9d7c9410ca8 100644 (file)
@@ -135,7 +135,7 @@ Cbc &
 CbcPointer<Cbc>::operator *() const
 {
     Cbc *c = get();
-    Must(c);
+    assert(c);
     return *c;
 }
 
@@ -144,7 +144,7 @@ Cbc *
 CbcPointer<Cbc>::operator ->() const
 {
     Cbc *c = get();
-    Must(c);
+    assert(c);
     return c;
 }