summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-12-14 15:32:35 +0100
committerAlexander Larsson <alexl@redhat.com>2009-12-14 19:34:05 +0100
commit91489f225b5b6329af2a9bd84dd7712c50df082b (patch)
tree898ef1d1e627f016eb70f7aa74c019b7a58be92e
parent6137b502fb9b5be2a85f79abf151084240cdd3d6 (diff)
downloadnautilus-91489f225b5b6329af2a9bd84dd7712c50df082b.tar.gz
Don't access uninitialized variable
gdk_property_get doesn't set prop_text if it fails. (cherry picked from commit 75bcfea177c837215ea46c970bfea24ec04a3dae)
-rw-r--r--libnautilus-private/nautilus-icon-dnd.c2
-rw-r--r--libnautilus-private/nautilus-tree-view-drag-dest.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libnautilus-private/nautilus-icon-dnd.c b/libnautilus-private/nautilus-icon-dnd.c
index e2ad56c30..9a453536f 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 20646efdc..de3a1b17c 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;
}