Revision: 77658
          http://sourceforge.net/p/brlcad/code/77658
Author:   brlcad
Date:     2020-10-29 07:28:13 +0000 (Thu, 29 Oct 2020)
Log Message:
-----------
don't try to get the name of NULL dmpies

Modified Paths:
--------------
    brlcad/trunk/src/mged/attach.c

Modified: brlcad/trunk/src/mged/attach.c
===================================================================
--- brlcad/trunk/src/mged/attach.c      2020-10-28 12:39:13 UTC (rev 77657)
+++ brlcad/trunk/src/mged/attach.c      2020-10-29 07:28:13 UTC (rev 77658)
@@ -155,7 +155,6 @@
 release(char *name, int need_close)
 {
     struct mged_dm *save_dm_list = MGED_DM_NULL;
-    struct bu_vls *cpathname = dm_get_pathname(DMP);
     struct bu_vls *pathname = NULL;
 
     if (name != NULL) {
@@ -166,6 +165,9 @@
 
        for (size_t i = 0; i < BU_PTBL_LEN(&active_dm_set); i++) {
            struct mged_dm *m_dmp = (struct mged_dm 
*)BU_PTBL_GET(&active_dm_set, i);
+           if (!m_dmp || !m_dmp->dm_dmp)
+               continue;
+
            pathname = dm_get_pathname(m_dmp->dm_dmp);
            if (!BU_STR_EQUAL(name, bu_vls_cstr(pathname)))
                continue;
@@ -183,7 +185,7 @@
            Tcl_AppendResult(INTERP, "release: ", name, " not found\n", (char 
*)NULL);
            return TCL_ERROR;
        }
-    } else if (BU_STR_EQUAL("nu", bu_vls_cstr(cpathname)))
+    } else if (DMP && BU_STR_EQUAL("nu", bu_vls_cstr(dm_get_pathname(DMP))))
        return TCL_OK;  /* Ignore */
 
     if (fbp) {

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