Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 20, 2021
1 parent 30f7e99 commit b20c477
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ordered_relation_editor/core/ordered_relation_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def moveitems(self, index_from, index_to):

@pyqtSlot(int)
def onViewCurrentFeatureChanged(self, index):
self.currentFeatureChanged.emit(self._related_features[index])
if index >= 0 and index < len(self._related_features):
self.currentFeatureChanged.emit(self._related_features[index])

def roleNames(self):
return {
Expand Down

0 comments on commit b20c477

Please sign in to comment.