Revision: 75439
http://sourceforge.net/p/brlcad/code/75439
Author: starseeker
Date: 2020-04-17 17:24:33 +0000 (Fri, 17 Apr 2020)
Log Message:
-----------
Hmm. Broke something about switching display types in MGED...
Modified Paths:
--------------
brlcad/branches/dm-fb-merge/src/libdm/fb_generic.c
Modified: brlcad/branches/dm-fb-merge/src/libdm/fb_generic.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libdm/fb_generic.c 2020-04-17 16:46:07 UTC
(rev 75438)
+++ brlcad/branches/dm-fb-merge/src/libdm/fb_generic.c 2020-04-17 17:24:33 UTC
(rev 75439)
@@ -108,6 +108,7 @@
if (bu_strncmp(interface_type, _if_list[i]->i->if_name+5,
strlen(interface_type)) == 0) {
/* found it, copy its struct in */
*ifp = *(_if_list[i]);
+ *ifp->i = *(_if_list[i]->i);
return;
} else {
i++;
@@ -153,6 +154,7 @@
{
struct fb *ifp = (struct fb *)calloc(sizeof(struct fb), 1);
if (!ifp) return NULL;
+ ifp->i = (struct fb_impl *) calloc(sizeof(struct fb_impl), 1);
fb_set_interface(ifp, file);
fb_set_magic(ifp, FB_MAGIC);
if (ifp->i->if_open_existing) ifp->i->if_open_existing(ifp, width, height,
fb_p);
@@ -397,11 +399,11 @@
return FB_NULL;
ifp = (struct fb *) calloc(sizeof(struct fb), 1);
- ifp->i = (struct fb_impl *) calloc(sizeof(struct fb_impl), 1);
if (ifp == FB_NULL) {
Malloc_Bomb(sizeof(struct fb));
return FB_NULL;
}
+ ifp->i = (struct fb_impl *) calloc(sizeof(struct fb_impl), 1);
if (file == NULL || *file == '\0') {
/* No name given, check environment variable first. */
if ((file = (const char *)getenv("FB_FILE")) == NULL || *file == '\0') {
@@ -502,6 +504,7 @@
if (ifp->i->if_pbase != PIXEL_NULL)
free((void *) ifp->i->if_pbase);
free((void *) ifp->i->if_name);
+ free((void *) ifp->i);
free((void *) ifp);
return 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