[glom/gtktoolpallete] Check a pointer for null, though it shouldn't happen now.
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glom/gtktoolpallete] Check a pointer for null, though it shouldn't happen now.
- Date: Tue, 22 Dec 2009 15:15:05 +0000 (UTC)
commit 482950cf11c5b0b51270b8c63c168daefffad47e
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Dec 22 16:14:56 2009 +0100
Check a pointer for null, though it shouldn't happen now.
glom/utility_widgets/flowtable_dnd.cc | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/glom/utility_widgets/flowtable_dnd.cc b/glom/utility_widgets/flowtable_dnd.cc
index 218b7f1..5652e7c 100644
--- a/glom/utility_widgets/flowtable_dnd.cc
+++ b/glom/utility_widgets/flowtable_dnd.cc
@@ -191,8 +191,11 @@ void FlowTableDnd::on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& d
if(palette)
{
Gtk::Widget* tool_item = palette->get_drag_item(selection_data);
- const int type = GPOINTER_TO_INT(tool_item->get_data("glom-type"));
- on_dnd_add_layout_item_by_type(type, above);
+ if(tool_item)
+ {
+ const int type = GPOINTER_TO_INT(tool_item->get_data("glom-type"));
+ on_dnd_add_layout_item_by_type(type, above);
+ }
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]