diff --git a/src/preferences/printers/AddPrinterDialog.cpp b/src/preferences/printers/AddPrinterDialog.cpp index 8eccafb4e3..e1da4c4014 100644 --- a/src/preferences/printers/AddPrinterDialog.cpp +++ b/src/preferences/printers/AddPrinterDialog.cpp @@ -324,13 +324,13 @@ AddPrinterDialog::_FillMenu(BMenu* menu, const char* path, uint32 what) BMimeType entryType(type); // filter non executable entries (like "transport" subfolder...) if (entryType == B_APP_MIME_TYPE) { - BPath path; - if (entry.GetPath(&path) != B_OK) + BPath transportPath; + if (entry.GetPath(&transportPath) != B_OK) continue; BMessage* msg = new BMessage(what); - msg->AddString("name", path.Leaf()); - menu->AddItem(new BMenuItem(path.Leaf(), msg)); + msg->AddString("name", transportPath.Leaf()); + menu->AddItem(new BMenuItem(transportPath.Leaf(), msg)); } } }