Do not crash when right-clicking without any selection

This commit is contained in:
DarkPhoenix
2019-04-22 19:26:24 +03:00
parent be2e0b5de4
commit 24bc675319

View File

@@ -664,7 +664,7 @@ class FittingView(d.Display):
else:
if mod in fit.modules:
mainMod = mod
if mainMod is None:
if mainMod is None and len(selection) > 0:
mainMod = selection[0]
menu = ContextMenu.getMenu(mainMod, selection, *contexts)