Closed Bug 296001 Opened 19 years ago Closed 19 years ago

Crash deleting quicksearch results from history

Categories

(Camino Graveyard :: History, defect, P2)

PowerPC
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
Camino0.9

People

(Reporter: sfraser_bugs, Assigned: sfraser_bugs)

Details

(Keywords: crash)

In the history view, type into the search field to do a quicksearch (I was
viewing by site at the time). Command-A to select all the results, then hit the
delete key. It will crash.

Note that it doesn't crash if you delete items one by one.
Status: NEW → ASSIGNED
Keywords: crash
Priority: -- → P2
Target Milestone: --- → Camino0.9
I was calling -setParentItem on a deleted object. Fix:

Index: HistoryItem.mm
===================================================================
RCS file: /cvsroot/mozilla/camino/src/history/HistoryItem.mm,v
retrieving revision 1.10
diff -u -r1.10 HistoryItem.mm
--- HistoryItem.mm	23 May 2005 03:36:08 -0000	1.10
+++ HistoryItem.mm	2 Jun 2005 02:16:27 -0000
@@ -279,8 +279,8 @@
 
 - (void)removeChild:(HistoryItem*)inChild
 {
-  [mChildren removeObject:inChild];
   [inChild setParentItem:nil];
+  [mChildren removeObject:inChild];
 }
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.