Icon-O-Matic: Fix crash when unassigning path

Fixes #19375

Change-Id: I624cd8ad78e8e429f0ca3b32df24fb46e7636620
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10884
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
Zardshard
2026-05-07 08:19:08 +00:00
committed by Adrien Destugues
parent d2e7876d92
commit ead5f1bdfc
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -897,7 +897,7 @@ PathListView::_UpdateMarks()
{
int32 count = CountItems();
if (fCurrentShape != NULL) {
// enable display of marks and mark items whoes
// enable display of marks and mark items whose
// path is contained in fCurrentShape
for (int32 i = 0; i < count; i++) {
PathListItem* item = dynamic_cast<PathListItem*>(ItemAt(i));
@@ -27,6 +27,7 @@ UnassignPathCommand::UnassignPathCommand(PathSourceShape* shape,
fPath(path),
fPathRemoved(false)
{
fPath->AcquireReference();
}
// destructor