[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Gavin D. Smith |
Date: |
Sun, 20 Mar 2022 04:55:26 -0400 (EDT) |
branch: master
commit 97b6034b6cad4b634dbe0744291d1701c632c1b4
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Tue Oct 22 16:38:21 2019 +0100
avoid access to undefined iter
---
js/infog/main.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/js/infog/main.c b/js/infog/main.c
index 9d45274adc..60d4d0df5d 100644
--- a/js/infog/main.c
+++ b/js/infog/main.c
@@ -235,6 +235,10 @@ GtkTreeIter last_iter;
GtkTreeIter *toc_iter_ptr;
int toc_empty = 1;
+/* P is a pointer to lines sent from the web process extension representing
the
+ table of contents. The lines are in pairs: the first, with the
user-visible
+ text, the second, with the URL. The hierarchical structure of the TOC is
+ represented by "+" and "-" characters in front of the URL's. */
void
load_toc (char *p)
{
@@ -303,11 +307,11 @@ load_toc (char *p)
{
GtkTreeIter parent;
- /* Mark the parent entry as having no more children. */
- gtk_tree_store_set (toc_store, &toc_iter, 2, TRUE, -1);
-
if (toc_iter_ptr)
{
+ /* Mark the parent entry as having no more children. */
+ gtk_tree_store_set (toc_store, toc_iter_ptr, 2, TRUE, -1);
+
while (1)
{
bool result = gtk_tree_model_iter_parent
- [no subject], (continued)
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject],
Gavin D. Smith <=
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20
- [no subject], Gavin D. Smith, 2022/03/20