[glom] Box_Reports: Null checks.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Box_Reports: Null checks.
- Date: Thu, 5 Nov 2015 22:21:11 +0000 (UTC)
commit b92cf8fa9434c08facfb95e5a5ab3556f06be1bf
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Nov 3 17:39:14 2015 +0100
Box_Reports: Null checks.
glom/box_reports.cc | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/glom/box_reports.cc b/glom/box_reports.cc
index 311a1ef..719db7b 100644
--- a/glom/box_reports.cc
+++ b/glom/box_reports.cc
@@ -42,10 +42,20 @@ Box_Reports::Box_Reports(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builde
//Get the Glade-instantiated widgets, and connect signal handlers:
Gtk::Button* pButtonCancel = nullptr;
builder->get_widget("button_cancel", pButtonCancel);
+ if(!pButtonCancel)
+ {
+ std::cerr << G_STRFUNC << "Missing widget from glade file." << std::endl;
+ return;
+ }
set_button_cancel(*pButtonCancel);
Gtk::Box* pAddDelParent = nullptr;
builder->get_widget("vbox_adddel_parent", pAddDelParent);
+ if(!pAddDelParent)
+ {
+ std::cerr << G_STRFUNC << "Missing widget from glade file." << std::endl;
+ return;
+ }
pAddDelParent->pack_start(m_AddDel);
m_AddDel.signal_user_added().connect(sigc::mem_fun(*this, &Box_Reports::on_adddel_Add));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]