On 12/01/2016 20:44, Rene Gollent wrote:
On Tue, Jan 12, 2016 at 2:39 PM, <waddlesplash@xxxxxxxxx> wrote:
@@ -1516,13 +1517,13 @@ BShelf::_GetProperty(BMessage *msg, BMessage *reply)
for (int32 i = 0; i < CountReplicants(); i++) {
BView *view = NULL;
ReplicantAt(i, &view, &ID, &err);
- if (err == B_OK) {
- if (ID == id) {
- replicant = view;
- break;
- }
- err = B_NAME_NOT_FOUND;
+ if (err != B_OK || view == NULL)
+ continue;
+ if (ID == id) {
+ replicant = view;
+ break;
}
+ err = B_NAME_NOT_FOUND;
}
break;
}
This looks more like it's working around/hiding a different bug. If
ReplicantAt() actually successfully found a replicant, then the view
pointer should never be NULL.