From 526e8ead4e28bd8c77c4b4b12ecdbccd29b1cf90 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Thu, 27 Sep 2018 17:48:12 +0200 Subject: SP_ACTIVE_DESKTOP: check for NULL or eliminate --- src/selection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/selection.cpp') diff --git a/src/selection.cpp b/src/selection.cpp index 142695855..7076174bc 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -192,7 +192,7 @@ Selection::emptyBackup(){ void Selection::setBackup () { - SPDesktop *desktop = SP_ACTIVE_DESKTOP; + SPDesktop *desktop = this->desktop(); SPDocument *document = SP_ACTIVE_DOCUMENT; Inkscape::UI::Tools::NodeTool *tool = nullptr; if (desktop) { @@ -255,7 +255,7 @@ Selection::setBackup () void Selection::restoreBackup() { - SPDesktop *desktop = SP_ACTIVE_DESKTOP; + SPDesktop *desktop = this->desktop(); SPDocument *document = SP_ACTIVE_DOCUMENT; Inkscape::UI::Tools::NodeTool *tool = nullptr; if (desktop) { -- cgit v1.2.3