mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 15:28:28 -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
@ -491,7 +491,14 @@ FeedItem *RSFeedWidget::findFeedItem(const std::string& identifier)
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user