Tracker: Fix file handle leak while filtering poses
... closing the file handle it opens and fixing #20018. Change-Id: Ic6da22bf46fa24ec5f056f468d334c2d6e41069e Reviewed-on: https://review.haiku-os.org/c/haiku/+/11413 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
be1b4b813d
commit
868b6993ea
@@ -10559,9 +10559,12 @@ BPoseView::FilterPose(BPose* pose)
|
|||||||
if (pose == NULL || !IsFiltering())
|
if (pose == NULL || !IsFiltering())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
ModelNodeLazyOpener modelOpener(pose->TargetModel());
|
||||||
if (IsRefFiltering()) {
|
if (IsRefFiltering()) {
|
||||||
|
modelOpener.OpenNode();
|
||||||
|
|
||||||
Model* model = pose->TargetModel();
|
Model* model = pose->TargetModel();
|
||||||
if (model->OpenNode() != B_OK)
|
if (!model->IsNodeOpen())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
struct stat_beos stat;
|
struct stat_beos stat;
|
||||||
@@ -10576,7 +10579,6 @@ BPoseView::FilterPose(BPose* pose)
|
|||||||
bool found[stringCount];
|
bool found[stringCount];
|
||||||
memset(found, 0, sizeof(found));
|
memset(found, 0, sizeof(found));
|
||||||
|
|
||||||
ModelNodeLazyOpener modelOpener(pose->TargetModel());
|
|
||||||
for (int32 i = 0; i < CountColumns(); i++) {
|
for (int32 i = 0; i < CountColumns(); i++) {
|
||||||
BTextWidget* widget = pose->WidgetFor(ColumnAt(i), this, modelOpener);
|
BTextWidget* widget = pose->WidgetFor(ColumnAt(i), this, modelOpener);
|
||||||
const char* text = NULL;
|
const char* text = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user