mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Fix NPE when interval has no tags
This commit is contained in:
parent
3c0627166a
commit
0273987ae6
1 changed files with 6 additions and 3 deletions
|
@ -216,10 +216,13 @@ Interval Interval::fromJson (std::string jsonString)
|
|||
|
||||
json::array* tags = (json::array*) json->_data["tags"];
|
||||
|
||||
for (auto& tag : tags->_data)
|
||||
if (tags != nullptr)
|
||||
{
|
||||
auto* value = (json::string*) tag;
|
||||
interval.tag(value->_data);
|
||||
for (auto& tag : tags->_data)
|
||||
{
|
||||
auto* value = (json::string*) tag;
|
||||
interval.tag(value->_data);
|
||||
}
|
||||
}
|
||||
|
||||
json::string* start = (json::string*) json->_data["start"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue