summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-07-27 07:34:28 +0200
committerSven Gothel <[email protected]>2020-07-27 07:34:28 +0200
commit345772f9b5d51e04f2fd4409d8c90bd6f0dc195c (patch)
tree0104a5898c61dc5fd1205d3e660c7578919d1a42 /java
parent5a660fe04c5ddaa68a49ddfb50a2bc562fc390a8 (diff)
DBusManager_delete: Do not call destructor, C++ implementation says so. Avoid double free @ closing.
Diffstat (limited to 'java')
-rw-r--r--java/jni/tinyb/DBusManager.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/java/jni/tinyb/DBusManager.cxx b/java/jni/tinyb/DBusManager.cxx
index f8d6ea4a..2919d28e 100644
--- a/java/jni/tinyb/DBusManager.cxx
+++ b/java/jni/tinyb/DBusManager.cxx
@@ -441,7 +441,8 @@ void Java_tinyb_dbus_DBusManager_delete(JNIEnv *env, jobject obj)
{
try {
BluetoothManager *manager = getInstance<BluetoothManager>(env, obj);
- delete manager;
+ (void) manager;
+ // delete manager; // Should not be called!
} catch (std::bad_alloc &e) {
raise_java_oom_exception(env, e);
} catch (BluetoothException &e) {