NullPointerException Error

I am attempting to build a navigation menu however I’m getting a NullPointerException thrown by java whenever I select an item in the menu. For example, here is the traceback.

Traceback (most recent call last):

  File "<event:mouseClicked>", line 8, in <module>

java.lang.NullPointerException: java.lang.NullPointerException

	caused by NullPointerException

Ignition v7.9.13 (b2019120915)
Java: Oracle Corporation 1.8.0_251

The script I am using was lifted directly from the example project template. Here is the code.

if event.clickCount == 2:
	row = event.source.selectedItem
	data =
	if row != -1:
		# Grab the window path value out of the tree view's items dataset
		windowPath = data.getValueAt(row, "windowPath")

The system.gui.messageBox(windowPath) shows that windowPath is not being set. Is there a way to resolve this?

Got it working. Apparently double clicking on the menu tree does not take you to the proper location, you need to use the Items properly instead. Are there any plans to make menu creation easier? Manually setting window paths in a data set is a bit of a pain when they are already defined in the designer.