From 931a51e4e136cd10f14bb2a6605c624d91cadd94 Mon Sep 17 00:00:00 2001 From: Lan Zagar Date: Wed, 21 Dec 2016 15:14:11 +0100 Subject: [PATCH] Merge pull request #1827 from janezd/fix-crash-cmd-c [FIX] Crash on ctrl-c/cmd-c in widgets without graphs (cherry picked from commit be22b642f252cc5cc7583ee2da9baea915ff9232) --- Orange/widgets/widget.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Orange/widgets/widget.py b/Orange/widgets/widget.py index 01d5a9885d9..13bd5a86761 100644 --- a/Orange/widgets/widget.py +++ b/Orange/widgets/widget.py @@ -339,10 +339,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):