[libgda] GdaVConnectionDataModel: fix context object get weak ref
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] GdaVConnectionDataModel: fix context object get weak ref
- Date: Wed, 13 Feb 2019 17:50:34 +0000 (UTC)
commit fc43197461524741140a6ffaa130c828bd31a732
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date: Tue Feb 12 16:23:14 2019 -0600
GdaVConnectionDataModel: fix context object get weak ref
libgda/sqlite/virtual/gda-vconnection-data-model.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libgda/sqlite/virtual/gda-vconnection-data-model.c
b/libgda/sqlite/virtual/gda-vconnection-data-model.c
index 29ff07824..4be14dc66 100644
--- a/libgda/sqlite/virtual/gda-vconnection-data-model.c
+++ b/libgda/sqlite/virtual/gda-vconnection-data-model.c
@@ -608,8 +608,10 @@ static void
vcontext_free (VContext *context)
{
GObject *obj = g_weak_ref_get (&(context->context_object));
- g_hash_table_remove (context->vtable->context.hash, obj);
- g_object_unref (obj);
+ if (obj) {
+ g_hash_table_remove (context->vtable->context.hash, obj);
+ g_object_unref (obj);
+ }
if (context->context_data) {
g_array_free (context->context_data, TRUE);
context->context_data = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]