[nautilus/gnome-2-28] Don't access uninitialized variable



commit 91489f225b5b6329af2a9bd84dd7712c50df082b
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Dec 14 15:32:35 2009 +0100

    Don't access uninitialized variable
    
    gdk_property_get doesn't set prop_text if it fails.
    (cherry picked from commit 75bcfea177c837215ea46c970bfea24ec04a3dae)

 libnautilus-private/nautilus-icon-dnd.c            |    2 +-
 libnautilus-private/nautilus-tree-view-drag-dest.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libnautilus-private/nautilus-icon-dnd.c b/libnautilus-private/nautilus-icon-dnd.c
index e2ad56c..9a45353 100644
--- a/libnautilus-private/nautilus-icon-dnd.c
+++ b/libnautilus-private/nautilus-icon-dnd.c
@@ -380,7 +380,7 @@ get_direct_save_filename (GdkDragContext *context)
 	
 	if (!gdk_property_get (context->source_window, gdk_atom_intern (NAUTILUS_ICON_DND_XDNDDIRECTSAVE_TYPE, FALSE),
 			       gdk_atom_intern ("text/plain", FALSE), 0, 1024, FALSE, NULL, NULL,
-			       &prop_len, &prop_text) && prop_text != NULL) {
+			       &prop_len, &prop_text)) {
 		return NULL;
 	}
 	
diff --git a/libnautilus-private/nautilus-tree-view-drag-dest.c b/libnautilus-private/nautilus-tree-view-drag-dest.c
index 20646ef..de3a1b1 100644
--- a/libnautilus-private/nautilus-tree-view-drag-dest.c
+++ b/libnautilus-private/nautilus-tree-view-drag-dest.c
@@ -854,7 +854,7 @@ get_direct_save_filename (GdkDragContext *context)
 	
 	if (!gdk_property_get (context->source_window, gdk_atom_intern (NAUTILUS_ICON_DND_XDNDDIRECTSAVE_TYPE, FALSE),
 			       gdk_atom_intern ("text/plain", FALSE), 0, 1024, FALSE, NULL, NULL,
-			       &prop_len, &prop_text) && prop_text != NULL) {
+			       &prop_len, &prop_text)) {
 		return NULL;
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]