diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-01 00:25:16 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-01 00:49:12 +0200 |
commit | 85456fae54029edd26df2277a9eec5e2fe3d9739 (patch) | |
tree | fd55ad48b34c66f0b839edcbc952a8a5a0752c72 /javaunohelper | |
parent | 1d35b89e7581e12024769d19bfb6d6eb2c3274b8 (diff) |
tdf#120703 PVS: Silence V522 warnings
V522 There might be dereferencing of a potential null pointer.
Change-Id: Ie617b41a8f8d334022cf5313b242a236baedba48
Reviewed-on: https://gerrit.libreoffice.org/70017
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'javaunohelper')
-rw-r--r-- | javaunohelper/source/bootstrap.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx index 442dd00ef2c5..8d593ce54112 100644 --- a/javaunohelper/source/bootstrap.cxx +++ b/javaunohelper/source/bootstrap.cxx @@ -55,6 +55,7 @@ static OUString jstring_to_oustring( jstring jstr, JNIEnv * jni_env ) jsize len = jni_env->GetStringLength( jstr ); rtl_uString * ustr = static_cast<rtl_uString *>(std::malloc( sizeof (rtl_uString) + (len * sizeof (sal_Unicode)) )); + assert(ustr); jni_env->GetStringRegion( jstr, 0, len, reinterpret_cast<jchar *>(ustr->buffer) ); OSL_ASSERT( !jni_env->ExceptionCheck() ); ustr->refCount = 1; |