diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2011-02-21 20:37:03 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2011-02-21 20:37:03 +0000 |
commit | 41deed51a7da00ad2984a7c89e2572174991192b (patch) | |
tree | 29b73fa9ecb6a4c5520d14aacda0c2c864f3889b /src/native/addrbook/msoutlook | |
parent | c6971afd001ac65d3bce483bdd946bc2afaf53fb (diff) | |
download | jitsi-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.cxx | 44 |
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;
}
|