Make gswe_antiscion_axis_info_free() to unref its start_sign

This is to fix a bug that makes the library crash when the timestamp
or the chart changes.
This commit is contained in:
2014-03-15 18:38:27 +01:00
parent e23c789ff0
commit 41a80ca365
5 changed files with 23 additions and 10 deletions

View File

@@ -52,7 +52,8 @@ static gboolean gswe_initializing = FALSE;
(v)->orb = (o); \
(v)->name = g_strdup(n); \
(v)->points = (h); \
g_hash_table_replace((ht), GINT_TO_POINTER(i), (v));
g_hash_table_replace((ht), GINT_TO_POINTER(i), (v)); \
gswe_planet_info_ref((v));
#define ADD_SIGN(ht, v, s, n, e, q) \
(v) = gswe_sign_info_new(); \
@@ -60,14 +61,16 @@ static gboolean gswe_initializing = FALSE;
(v)->name = g_strdup(n); \
(v)->element = (e); \
(v)->quality = (q); \
g_hash_table_replace((ht), GINT_TO_POINTER(s), (v));
g_hash_table_replace((ht), GINT_TO_POINTER(s), (v)); \
gswe_sign_info_ref((v));
#define ADD_HOUSE_SYSTEM(ht, v, i, s, n) \
(v) = gswe_house_system_info_new(); \
(v)->house_system = i; \
(v)->sweph_id = s; \
(v)->name = g_strdup(n); \
g_hash_table_replace((ht), GINT_TO_POINTER(i), (v));
g_hash_table_replace((ht), GINT_TO_POINTER(i), (v)); \
gswe_house_system_info_ref((v));
#define ADD_ASPECT(ht, v, i, n, s, o, h, m) \
(v) = gswe_aspect_info_new(); \
@@ -77,7 +80,8 @@ static gboolean gswe_initializing = FALSE;
(v)->orb_modifier = (o); \
(v)->harmonic = (h); \
(v)->major = (m); \
g_hash_table_replace((ht), GINT_TO_POINTER(i), (v));
g_hash_table_replace((ht), GINT_TO_POINTER(i), (v)); \
gswe_aspect_info_ref((v));
#define ADD_ANTISCION(ht, v, hts, vs, i, n, s, m) \
(v) = gswe_antiscion_axis_info_new(); \
@@ -86,7 +90,8 @@ static gboolean gswe_initializing = FALSE;
(v)->start_sign = (vs); \
(v)->name = g_strdup(n); \
(v)->sign_offset = m; \
g_hash_table_replace((ht), GINT_TO_POINTER(i), (v));
g_hash_table_replace((ht), GINT_TO_POINTER(i), (v)); \
gswe_antiscion_axis_info_ref((v));
/**
* gswe_error_quark: