Skip to content
Snippets Groups Projects
Commit b882f160 authored by edgrif's avatar edgrif
Browse files

hacked fix to double free bug, items freed here and also in windowtextitem (probably).

parent 0b2d95be
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Sep 18 13:09 2009 (edgrif)
* Last edited: Sep 25 14:09 2009 (edgrif)
* Created: Mon Jul 30 13:09:33 2007 (rds)
* CVS info: $Id: zmapWindowContainerFeatureSet.c,v 1.11 2009-09-24 13:30:53 edgrif Exp $
* CVS info: $Id: zmapWindowContainerFeatureSet.c,v 1.12 2009-09-25 13:29:37 edgrif Exp $
*-------------------------------------------------------------------
*/
#include <string.h> /* memset */
......@@ -582,15 +582,15 @@ void zmapWindowContainerFeatureSetPushHiddenStack(ZMapWindowContainerFeatureSet
void zmapWindowContainerFeatureSetRemoveAllItems(ZMapWindowContainerFeatureSet container_set)
{
ZMapWindowContainerFeatures container_features;
ZMapWindowContainerFeatures container_features ;
if((container_features = zmapWindowContainerGetFeatures((ZMapWindowContainerGroup)container_set)))
if ((container_features = zmapWindowContainerGetFeatures((ZMapWindowContainerGroup)container_set)))
{
FooCanvasGroup *group;
FooCanvasGroup *group ;
group = FOO_CANVAS_GROUP(container_features);
group = FOO_CANVAS_GROUP(container_features) ;
zmapWindowContainerUtilsRemoveAllItems(group);
zmapWindowContainerUtilsRemoveAllItems(group) ;
}
return ;
......@@ -922,8 +922,20 @@ static void zmap_window_item_feature_set_destroy(GtkObject *gtkobject)
container_set->user_hidden_stack = NULL;
}
if(gtkobject_class->destroy)
(gtkobject_class->destroy)(gtkobject);
{
char *col_name ;
col_name = g_quark_to_string(zmapWindowContainerFeatureSetColumnDisplayName(container_set)) ;
if (g_ascii_strcasecmp("3 frame translation", col_name) !=0)
{
if (gtkobject_class->destroy)
(gtkobject_class->destroy)(gtkobject);
}
}
return ;
}
......
......@@ -26,9 +26,9 @@
*
* Exported functions:
* HISTORY:
* Last edited: Aug 14 11:06 2009 (edgrif)
* Last edited: Sep 25 14:10 2009 (edgrif)
* Created: Thu Jul 29 10:45:00 2004 (rnc)
* CVS info: $Id: zmapWindowDrawFeatures.c,v 1.250 2009-08-14 10:06:47 edgrif Exp $
* CVS info: $Id: zmapWindowDrawFeatures.c,v 1.251 2009-09-25 13:29:36 edgrif Exp $
*-------------------------------------------------------------------
*/
......@@ -941,20 +941,30 @@ static void purge_hide_frame_specific_columns(ZMapWindowContainerGroup container
{
ZMapStrand column_strand;
column_strand = zmapWindowContainerFeatureSetGetStrand(container_set);
column_strand = zmapWindowContainerFeatureSetGetStrand(container_set) ;
zMapLogMessage("column %s [%s]",
g_quark_to_string(container_set->unique_id),
zMapFeatureStrand2Str(column_strand));
zMapFeatureStrand2Str(column_strand)) ;
if ((column_strand != ZMAPSTRAND_REVERSE) ||
(column_strand == ZMAPSTRAND_REVERSE && window->show_3_frame_reverse))
if ((column_strand != ZMAPSTRAND_REVERSE)
|| (column_strand == ZMAPSTRAND_REVERSE && window->show_3_frame_reverse))
{
zMapLogMessage("hiding %s", g_quark_to_string(container_set->unique_id));
char *col_name ;
zMapLogMessage("hiding %s", g_quark_to_string(container_set->unique_id)) ;
zmapWindowColumnHide((FooCanvasGroup *)container) ;
zmapWindowContainerFeatureSetRemoveAllItems(container_set) ;
/* aggghhhh, gross hack: there is a bug in the freeing of the "text" cols for
* 3 frame translation which must be doing a double free somewhere. So we don't
* free them here...I think they do get freed by the textItem code though !
* See also zmap_window_item_feature_set_destroy() in items/zmapWindowContainerFeatureSet.c
* */
col_name = g_quark_to_string(zmapWindowContainerFeatureSetColumnDisplayName(container_set)) ;
if (g_ascii_strcasecmp("3 frame translation", col_name) !=0)
zmapWindowContainerFeatureSetRemoveAllItems(container_set) ;
}
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment