diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-04-09 16:53:52 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-04-09 19:15:05 +0200 |
commit | c1e320836b7dbcd9fe6ded8352355ea6101bd821 (patch) | |
tree | 0bf5f5c3a9ff3b23af40b3cce60f104f0eaf8216 /include/osl | |
parent | 15bdba65394362e68f1b11f439674d2652bf4cda (diff) |
Add asserts to *Guard pointer constructors...
... as we can't drop them. IMHO it's still better then just a
crash. Has to use NULL, as the API is pre-C++11 compatible.
Change-Id: Idb4395d14a9185f4d7d1c2f048ad950518eef133
Reviewed-on: https://gerrit.libreoffice.org/70465
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'include/osl')
-rw-r--r-- | include/osl/mutex.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/osl/mutex.hxx b/include/osl/mutex.hxx index c2ee448d868e..5bcf0e56cce0 100644 --- a/include/osl/mutex.hxx +++ b/include/osl/mutex.hxx @@ -22,6 +22,7 @@ #include "osl/mutex.h" +#include <cassert> namespace osl { @@ -119,6 +120,7 @@ namespace osl */ Guard(T * pT_) : pT(pT_) { + assert(pT != NULL); pT->acquire(); } @@ -153,6 +155,7 @@ namespace osl */ ClearableGuard(T * pT_) : pT(pT_) { + assert(pT != NULL); pT->acquire(); } |