BPoseView::AttributeChanged(): additional check in icon case

Model::AttrChanged() requires the model to be open and so does
IconCache::IconChanged(), so add the check. Not sure if the block is
ever executed now (or ever worked before). This does at least prevent
asserts being triggered when compiled with debugging enabled.
This commit is contained in:
Ingo Weinhold 2013-06-29 13:58:10 +02:00
parent e19f9091cd
commit de85051c81

View File

@ -5596,6 +5596,7 @@ BPoseView::AttributeChanged(const BMessage* message)
message->FindString("attr", &attrName);
if (TargetModel() != NULL && *TargetModel()->NodeRef() == itemNode
&& TargetModel()->IsNodeOpen()
&& TargetModel()->AttrChanged(attrName)) {
// the icon of our target has changed, update drag icon
// TODO: make this simpler (ie. store the icon with the window)