mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-18 01:54:25 -05:00
fixed bug caused by comparing temporary object output of uniqueIdentifier() method to another string
This commit is contained in:
parent
11c520d280
commit
459ddc8883
1 changed files with 8 additions and 1 deletions
|
|
@ -491,7 +491,14 @@ FeedItem *RSFeedWidget::findFeedItem(const std::string& identifier)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (feedItem->uniqueIdentifier() == identifier)
|
// (cyril) It seems that a local variable must be used to store this identifier.
|
||||||
|
// Directly comparing identifier such as in:
|
||||||
|
// if(feedItem->uniqueIdentifier() == identifier)
|
||||||
|
// causes a crash. I dont know why! If someone ever finds why, please tell me.
|
||||||
|
|
||||||
|
std::string id = feedItem->uniqueIdentifier();
|
||||||
|
|
||||||
|
if (id == identifier)
|
||||||
return feedItem;
|
return feedItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue