1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Johan Samyn  committed e724702

qreorder: avoid traceback if no patch in queue and doing a right-click

  • Participants
  • Parent commits a26b9e7
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/qreorder.py

View file
                 QListWidget.__init__(self, parent)
                 self.setCurrentRow(0)
             def contextMenuEvent(self, event):
-                self.menuRequested.emit(event.globalPos(),
-                    self.item(self.currentRow()).patchname)
+                i = self.item(self.currentRow())
+                if i:
+                    self.menuRequested.emit(event.globalPos(), i.patchname)
             def focusInEvent(self, e):
                 i = self.item(self.currentRow())
                 if i: