Skip to content

Commit

Permalink
Merge pull request biolab#1827 from janezd/fix-crash-cmd-c
Browse files Browse the repository at this point in the history
[FIX] Crash on ctrl-c/cmd-c in widgets without graphs
  • Loading branch information
lanzagar authored and astaric committed Jan 4, 2017
1 parent 225ec0d commit 2f2caf0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Orange/widgets/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,11 @@ def save_graph(self):
saveplot.save_plot(graph_obj, self.graph_writers)

def copy_to_clipboard(self):
graph_obj = getdeepattr(self, self.graph_name, None)
if graph_obj is None:
return
ClipboardFormat.write_image(None, graph_obj)
if self.graph_name:
graph_obj = getdeepattr(self, self.graph_name, None)
if graph_obj is None:
return
ClipboardFormat.write_image(None, graph_obj)

def __restoreWidgetGeometry(self):

Expand Down

0 comments on commit 2f2caf0

Please sign in to comment.