Add more guards to aspect calculations
gswe_aspect_data_calculate() may get called if the currently set planet is NULL
This commit is contained in:
parent
4d5866b405
commit
bf5a839511
@ -230,7 +230,7 @@ gswe_aspect_data_set_planet1(
|
|||||||
|
|
||||||
aspect_data->planet1 = gswe_planet_data_ref(planet1);
|
aspect_data->planet1 = gswe_planet_data_ref(planet1);
|
||||||
|
|
||||||
if (aspect_data->planet2) {
|
if (planet1 && aspect_data->planet2) {
|
||||||
gswe_aspect_data_calculate(aspect_data);
|
gswe_aspect_data_calculate(aspect_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -268,7 +268,7 @@ gswe_aspect_data_set_planet2(
|
|||||||
|
|
||||||
aspect_data->planet2 = gswe_planet_data_ref(planet2);
|
aspect_data->planet2 = gswe_planet_data_ref(planet2);
|
||||||
|
|
||||||
if (aspect_data->planet1) {
|
if (aspect_data->planet1 && planet2) {
|
||||||
gswe_aspect_data_calculate(aspect_data);
|
gswe_aspect_data_calculate(aspect_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user