Add error reporting to add_points()
It is possible that planet_data->sign_info is NULL, which results in a SEGFAULT.
This commit is contained in:
parent
366155b835
commit
06fce9c9d5
@ -1156,7 +1156,17 @@ add_points(GswePlanetData *planet_data, GsweMoment *moment)
|
|||||||
);
|
);
|
||||||
|
|
||||||
sign_info = gswe_planet_data_get_sign_info(planet_data);
|
sign_info = gswe_planet_data_get_sign_info(planet_data);
|
||||||
|
|
||||||
|
if (G_UNLIKELY(sign_info == NULL)) {
|
||||||
|
g_error("Planet data calculation failed");
|
||||||
|
}
|
||||||
|
|
||||||
planet_info = gswe_planet_data_get_planet_info(planet_data);
|
planet_info = gswe_planet_data_get_planet_info(planet_data);
|
||||||
|
|
||||||
|
if (G_UNLIKELY(planet_info == NULL)) {
|
||||||
|
g_error("Planet data calculation failed. No planet info.");
|
||||||
|
}
|
||||||
|
|
||||||
element = gswe_sign_info_get_element(sign_info);
|
element = gswe_sign_info_get_element(sign_info);
|
||||||
point = GPOINTER_TO_INT(g_hash_table_lookup(
|
point = GPOINTER_TO_INT(g_hash_table_lookup(
|
||||||
moment->priv->element_points,
|
moment->priv->element_points,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user