aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/addrbook/msoutlook
diff options
context:
space:
mode:
authorLyubomir Marinov <lyubomir.marinov@jitsi.org>2011-02-21 20:37:03 +0000
committerLyubomir Marinov <lyubomir.marinov@jitsi.org>2011-02-21 20:37:03 +0000
commit41deed51a7da00ad2984a7c89e2572174991192b (patch)
tree29b73fa9ecb6a4c5520d14aacda0c2c864f3889b /src/native/addrbook/msoutlook
parentc6971afd001ac65d3bce483bdd946bc2afaf53fb (diff)
downloadjitsi-41deed51a7da00ad2984a7c89e2572174991192b.zip
jitsi-41deed51a7da00ad2984a7c89e2572174991192b.tar.gz
jitsi-41deed51a7da00ad2984a7c89e2572174991192b.tar.bz2
Fixes a couple of possible causes of access violation in the JNI library of the support for Microsoft Outlook contacts.
Diffstat (limited to 'src/native/addrbook/msoutlook')
-rw-r--r--src/native/addrbook/msoutlook/net_java_sip_communicator_plugin_addrbook_msoutlook_MsOutlookAddrBookContactQuery.cxx44
1 files changed, 27 insertions, 17 deletions
diff --git a/src/native/addrbook/msoutlook/net_java_sip_communicator_plugin_addrbook_msoutlook_MsOutlookAddrBookContactQuery.cxx b/src/native/addrbook/msoutlook/net_java_sip_communicator_plugin_addrbook_msoutlook_MsOutlookAddrBookContactQuery.cxx
index f238e19..b1b5800 100644
--- a/src/native/addrbook/msoutlook/net_java_sip_communicator_plugin_addrbook_msoutlook_MsOutlookAddrBookContactQuery.cxx
+++ b/src/native/addrbook/msoutlook/net_java_sip_communicator_plugin_addrbook_msoutlook_MsOutlookAddrBookContactQuery.cxx
@@ -169,31 +169,41 @@ Java_net_java_sip_communicator_plugin_addrbook_msoutlook_MsOutlookAddrBookContac
{
case PT_STRING8:
{
- jstring value;
-
- value = jniEnv->NewStringUTF(prop->Value.lpszA);
- if (value)
+ if (prop->Value.lpszA)
{
- jniEnv->SetObjectArrayElement(props, j, value);
- if (jniEnv->ExceptionCheck())
- props = NULL;
+ jstring value;
+
+ value = jniEnv->NewStringUTF(prop->Value.lpszA);
+ if (value)
+ {
+ jniEnv->SetObjectArrayElement(
+ props,
+ j, value);
+ if (jniEnv->ExceptionCheck())
+ props = NULL;
+ }
}
break;
}
case PT_UNICODE:
{
- jstring value;
-
- value
- = jniEnv->NewString(
- (const jchar *) (prop->Value.lpszW),
- wcslen(prop->Value.lpszW));
- if (value)
+ if (prop->Value.lpszW)
{
- jniEnv->SetObjectArrayElement(props, j, value);
- if (jniEnv->ExceptionCheck())
- props = NULL;
+ jstring value;
+
+ value
+ = jniEnv->NewString(
+ (const jchar *) (prop->Value.lpszW),
+ wcslen(prop->Value.lpszW));
+ if (value)
+ {
+ jniEnv->SetObjectArrayElement(
+ props,
+ j, value);
+ if (jniEnv->ExceptionCheck())
+ props = NULL;
+ }
}
break;
}