summaryrefslogtreecommitdiff
path: root/client/widgets/button.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets/button.cc')
-rw-r--r--client/widgets/button.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/client/widgets/button.cc b/client/widgets/button.cc
index 42c4371..6ef6ac8 100644
--- a/client/widgets/button.cc
+++ b/client/widgets/button.cc
@@ -56,10 +56,11 @@ Button::Button(QDomNode &node, MacroWindow *macrowindow)
}
}
- connect(this, SIGNAL(act_commit()), macrowindow, SLOT(commit()));
- connect(this, SIGNAL(act_cancel()), macrowindow, SLOT(cancel()));
- connect(macrowindow, SIGNAL(macroHasChanged()), this, SLOT(do_enable()));
-
+ if(macrowindow) {
+ connect(this, SIGNAL(act_commit()), macrowindow, SLOT(commit()));
+ connect(this, SIGNAL(act_cancel()), macrowindow, SLOT(cancel()));
+ connect(macrowindow, SIGNAL(macroHasChanged()), this, SLOT(do_enable()));
+ }
}
Button::~Button()