Skip to content

Commit

Permalink
Tracker: Tracker crashes in KeyDown() if there are no models associat…
Browse files Browse the repository at this point in the history
…ed with the PoseView.

Happens in special windows, such as OpenWith Window, that do have a PoseView not associated
with a model.  Fixes #8160.
  • Loading branch information
stpere committed Nov 26, 2012
1 parent 52cdfde commit dbe3088
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/kits/tracker/PoseView.cpp
Expand Up @@ -6445,6 +6445,10 @@ BPoseView::KeyDown(const char* bytes, int32 count)

case B_DELETE:
{
if (TargetModel() == NULL) {
// Happens if called from within OpenWith window, for example
break;
}
// Make sure user can't trash something already in the trash.
if (TargetModel()->IsTrash()) {
// Delete without asking from the trash
Expand Down

0 comments on commit dbe3088

Please sign in to comment.