[haiku-commits] Re: haiku: hrev50021 - src/kits/interface

  • From: François Revol <revol@xxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 12 Jan 2016 20:45:53 +0100

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.

Well those are probably zombies I got when removing the tipster binary.

Should we really discard zombies ?

François.


Other related posts: