Revision: 48399
          http://brlcad.svn.sourceforge.net/brlcad/?rev=48399&view=rev
Author:   r_weiss
Date:     2012-01-11 16:51:41 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
Updated file 'nmg_mk.c' function 'nmg_demote_eu'. Removed potential of 
referencing an element after it is freed.

Modified Paths:
--------------
    brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c

Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c
===================================================================
--- brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c      2012-01-11 16:43:59 UTC 
(rev 48398)
+++ brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c      2012-01-11 16:51:41 UTC 
(rev 48399)
@@ -2743,6 +2743,7 @@
     struct shell *s;
     struct vertex *v;
     int ret_val;
+    size_t tmp;
 
     if (*eu->up.magic_p != NMG_SHELL_MAGIC)
        bu_bomb("nmg_demote_eu() up is not shell\n");
@@ -2759,12 +2760,13 @@
     if (!nmg_is_vertex_a_selfloop_in_shell(v, s))
        (void)nmg_mlv(&s->l.magic, v, OT_SAME);
 
+    tmp = (size_t)eu;
     (void)nmg_keu(eu);
 
     ret_val = nmg_shell_is_empty(s);
 
     if (rt_g.NMG_debug & DEBUG_BASIC) {
-       bu_log("nmg_demote_eu(eu=0x%p) returns %d\n", eu, ret_val);
+       bu_log("nmg_demote_eu(eu=%x) returns %d\n", tmp, ret_val);
     }
 
     return ret_val;

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


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to