fix for 71675
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java
index 85b826d..da556ea 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java
@@ -409,10 +409,12 @@
public void handleEvent(Event event) {
ToolBar toolbar = perspectiveBar.getControl();
ToolItem item = toolbar.getItem(new Point(event.x, event.y));
- // ignore the first item, which remains in position Zero
- if (item.getData() instanceof PerspectiveBarNewContributionItem)
- return;
+
if (item != null) {
+ //ignore the first item, which remains in position Zero
+ if (item.getData() instanceof PerspectiveBarNewContributionItem)
+ return;
+
Rectangle bounds = item.getBounds();
Rectangle parentBounds = toolbar.getBounds();
bounds.x += parentBounds.x;