mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-05 11:09:12 -06:00
bugfix , make sure we have positions before trying to access it
This commit is contained in:
@@ -56,7 +56,8 @@ namespace openspace {
|
||||
int idx = DataFileHelper::findFileIndexForCurrentTime(time, timeDoubles);
|
||||
updateRadecData(idx);
|
||||
}
|
||||
if(!correctMinute(time)) {
|
||||
// positions have to be loaded before we try to update minute
|
||||
if(positions.size() && !correctMinute(time)) {
|
||||
//Compensate for light travel time to the spacecraft
|
||||
int idx = DataFileHelper::findFileIndexForCurrentTime(time, minuteTimes);
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace openspace {
|
||||
mutable std::vector<double> minuteTimes;
|
||||
mutable Position position;
|
||||
|
||||
mutable double activeMinute;
|
||||
mutable double activeMinute = -1;
|
||||
/* Identifier for object using the translation, used for logging */
|
||||
std::string objectIdentifier;
|
||||
/*Used to check if the loaded file is still relevant or if we should look for another one. */
|
||||
@@ -79,4 +79,4 @@ namespace openspace {
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // __OPENSPACE_MODULE_DSN___RADECMANAGER___H__
|
||||
|
||||
Reference in New Issue
Block a user