mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-21 07:43:08 +02:00
TW-1692: 42//' segfaults
- Thanks to Daniel Shahaf.
This commit is contained in:
parent
0d14822711
commit
1f47e8c99f
2 changed files with 9 additions and 0 deletions
|
@ -65,6 +65,10 @@ DOM::~DOM ()
|
|||
//
|
||||
bool DOM::get (const std::string& name, Variant& value)
|
||||
{
|
||||
// Special case, blank refs cause problems.
|
||||
if (name == "")
|
||||
return false;
|
||||
|
||||
int len = name.length ();
|
||||
Nibbler n (name);
|
||||
|
||||
|
@ -196,6 +200,10 @@ bool DOM::get (const std::string& name, Variant& value)
|
|||
// as special cases.
|
||||
bool DOM::get (const std::string& name, const Task& task, Variant& value)
|
||||
{
|
||||
// Special case, blank refs cause problems.
|
||||
if (name == "")
|
||||
return false;
|
||||
|
||||
// Quickly deal with the most common cases.
|
||||
if (task.size () && name == "id")
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue