aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-03-20 01:47:37 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-03-20 01:47:37 +0800
commitb54245206418ca079d14c2d01baead4328eed11b (patch)
tree257beee6350c9611130f3ac558c5ba221ac212ec
parent553bdcc9bd65b653f53145f75455890a314099c5 (diff)
downloadgsoc2013-evolution-b54245206418ca079d14c2d01baead4328eed11b.tar
gsoc2013-evolution-b54245206418ca079d14c2d01baead4328eed11b.tar.gz
gsoc2013-evolution-b54245206418ca079d14c2d01baead4328eed11b.tar.bz2
gsoc2013-evolution-b54245206418ca079d14c2d01baead4328eed11b.tar.lz
gsoc2013-evolution-b54245206418ca079d14c2d01baead4328eed11b.tar.xz
gsoc2013-evolution-b54245206418ca079d14c2d01baead4328eed11b.tar.zst
gsoc2013-evolution-b54245206418ca079d14c2d01baead4328eed11b.zip
Sigh. Fix a few really stupid crashes in EStorageSetView.
svn path=/trunk/; revision=8826
-rw-r--r--shell/ChangeLog9
-rw-r--r--shell/e-storage-set-view.c34
2 files changed, 26 insertions, 17 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 1f6dfbdad8..b66d3aacf4 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,14 @@
2001-03-19 Ettore Perazzoli <ettore@ximian.com>
+ * e-storage-set-view.c (init): Ooops. Initialize the
+ `drag_corba_source_context' member. correctly.
+ (table_drag_begin): Don't crash if queryInterface returns
+ `CORBA_OBJECT_NIL'.
+ (table_drag_end): Don't do anything if the
+ `drag_corba_source_interface' is `CORBA_OBJECT_NIL'.
+
+2001-03-19 Ettore Perazzoli <ettore@ximian.com>
+
* e-storage-set-view.c New members `drag_data',
`drag_corba_source_interface' and `drag_corba_source_context in
`EStorageSetViewPrivate'.
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 35716d84e5..5ff80f01d9 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -742,7 +742,8 @@ table_drag_begin (ETable *etable,
priv->drag_corba_source_interface = Bonobo_Unknown_queryInterface (corba_component,
"IDL:GNOME/Evolution/ShellComponentDnd/SourceFolder:1.0",
&ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
+ if (ev._major != CORBA_NO_EXCEPTION
+ || priv->drag_corba_source_interface == CORBA_OBJECT_NIL) {
priv->drag_corba_source_interface = CORBA_OBJECT_NIL;
CORBA_exception_free (&ev);
@@ -791,6 +792,9 @@ table_drag_end (ETable *table,
storage_set_view = E_STORAGE_SET_VIEW (table);
priv = storage_set_view->priv;
+ if (priv->drag_corba_source_interface == CORBA_OBJECT_NIL)
+ return;
+
CORBA_exception_init (&ev);
GNOME_Evolution_ShellComponentDnd_SourceFolder_endDrag (priv->drag_corba_source_interface,
@@ -1341,25 +1345,21 @@ init (EStorageSetView *storage_set_view)
priv = g_new (EStorageSetViewPrivate, 1);
- priv->storage_set = NULL;
- priv->path_to_etree_node = g_hash_table_new (g_str_hash, g_str_equal);
- priv->type_name_to_pixbuf = g_hash_table_new (g_str_hash, g_str_equal);
- priv->selected_row_path = NULL;
- priv->show_folders = TRUE;
-
- priv->drag_corba_source_interface = CORBA_OBJECT_NIL;
+ priv->storage_set = NULL;
+ priv->path_to_etree_node = g_hash_table_new (g_str_hash, g_str_equal);
+ priv->type_name_to_pixbuf = g_hash_table_new (g_str_hash, g_str_equal);
+ priv->selected_row_path = NULL;
+ priv->show_folders = TRUE;
- priv->drag_corba_source_context->physical_uri = NULL;
- priv->drag_corba_source_context->folder_type = NULL;
- priv->drag_corba_source_context->possible_actions = GNOME_Evolution_ShellComponentDnd_ACTION_DEFAULT;
- priv->drag_corba_source_context->suggested_action = GNOME_Evolution_ShellComponentDnd_ACTION_DEFAULT;
+ priv->drag_corba_source_interface = CORBA_OBJECT_NIL;
- priv->drag_corba_data = NULL;
+ priv->drag_corba_source_context = NULL;
+ priv->drag_corba_data = NULL;
- priv->drag_x = 0;
- priv->drag_y = 0;
- priv->drag_column = 0;
- priv->drag_row = 0;
+ priv->drag_x = 0;
+ priv->drag_y = 0;
+ priv->drag_column = 0;
+ priv->drag_row = 0;
storage_set_view->priv = priv;
}