[gtk+/wip/native-file-chooser: 1/7] TreeModelFilter: Fix uninitialized memory read.
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/native-file-chooser: 1/7] TreeModelFilter: Fix uninitialized memory read.
- Date: Wed, 4 Nov 2015 14:22:53 +0000 (UTC)
commit 1db7dc5c3c2980c29d117d28e6a31ce449af2618
Author: Alexander Larsson <alexl redhat com>
Date: Thu Oct 29 15:17:44 2015 +0100
TreeModelFilter: Fix uninitialized memory read.
We were copying an iterator that sometimes was not initialized,
which caused debugger warnings in VS2015.
gtk/gtktreemodelfilter.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c
index 01f3e17..0605796 100644
--- a/gtk/gtktreemodelfilter.c
+++ b/gtk/gtktreemodelfilter.c
@@ -1365,10 +1365,11 @@ gtk_tree_model_filter_check_ancestors (GtkTreeModelFilter *filter,
return;
if (filter->priv->virtual_root)
- gtk_tree_model_get_iter (filter->priv->child_model, &c_iter,
- filter->priv->virtual_root);
-
- tmp_iter = c_iter;
+ {
+ gtk_tree_model_get_iter (filter->priv->child_model, &c_iter,
+ filter->priv->virtual_root);
+ tmp_iter = c_iter;
+ }
gtk_tree_model_iter_nth_child (filter->priv->child_model, &c_iter,
filter->priv->virtual_root ? &tmp_iter : NULL,
indices[i]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]