Author: aldeck Date: 2009-10-23 10:07:56 +0200 (Fri, 23 Oct 2009) New Revision: 33744 Changeset: http://dev.haiku-os.org/changeset/33744/haiku Modified: haiku/trunk/src/kits/tracker/PoseView.cpp Log: * When a file was created, then deleted shortly after, on a PoseView that is busy processing other things, the file could be gone by the time we processed the fs notification message of the entry creation. This case wasn't handled properly and would cause #4130 and most certainly duplicate #4831, #4610 and also possibly #4271. Modified: haiku/trunk/src/kits/tracker/PoseView.cpp =================================================================== --- haiku/trunk/src/kits/tracker/PoseView.cpp 2009-10-23 02:06:51 UTC (rev 33743) +++ haiku/trunk/src/kits/tracker/PoseView.cpp 2009-10-23 08:07:56 UTC (rev 33744) @@ -5080,7 +5080,13 @@ // have to node monitor ahead of time because Model will // cache up the file type and preferred app Model *model = new Model(dirNode, itemNode, name, true); - if (model->InitCheck() != B_OK) { + + if (model->InitCheck() == B_ENTRY_NOT_FOUND) { + // might happen if the file was deleted shortly after creation and we + // were too busy to create the model in time see #4130 + delete model; + return NULL; + } else if (model->InitCheck() != B_OK) { // if we have trouble setting up model then we stuff it into // a zombie list in a half-alive state until we can properly awaken it PRINT(("2 adding model %s to zombie list, error %s\n", model->Name(),