Revision: 77685
          http://sourceforge.net/p/brlcad/code/77685
Author:   brlcad
Date:     2020-11-04 19:10:55 +0000 (Wed, 04 Nov 2020)
Log Message:
-----------
invert the loop so we avoid attempting to BU_PTBL_GET on an empty table

Modified Paths:
--------------
    brlcad/trunk/src/libged/search/search.c

Modified: brlcad/trunk/src/libged/search/search.c
===================================================================
--- brlcad/trunk/src/libged/search/search.c     2020-11-04 19:08:22 UTC (rev 
77684)
+++ brlcad/trunk/src/libged/search/search.c     2020-11-04 19:10:55 UTC (rev 
77685)
@@ -444,9 +444,9 @@
     }
 
     /* Check if all of our searches are local or not */
-    for (i = BU_PTBL_LEN(search_set) - 1; i >= 0; i--) {
+    for (i = 0; i < BU_PTBL_LEN(search_set); i++) {
        struct ged_search *search = (struct ged_search 
*)BU_PTBL_GET(search_set, i);
-       if (search->search_type != 1) {
+       if (search && search->search_type != 1) {
            all_local = 0;
        }
     }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to