Commit e4774d79 authored by Claes Sjofors's avatar Claes Sjofors

Some items detected by valgrind

parent 9bfa2661
...@@ -560,6 +560,7 @@ XttGtk::~XttGtk() ...@@ -560,6 +560,7 @@ XttGtk::~XttGtk()
delete value_recall; delete value_recall;
delete hotkey; delete hotkey;
delete methodtoolbar; delete methodtoolbar;
delete xnav;
} }
static gint delete_event( GtkWidget *w, GdkEvent *event, gpointer xtt) static gint delete_event( GtkWidget *w, GdkEvent *event, gpointer xtt)
......
...@@ -790,7 +790,7 @@ void FlowCtx::find_grid( double x, double y, double *x_grid, double *y_grid) ...@@ -790,7 +790,7 @@ void FlowCtx::find_grid( double x, double y, double *x_grid, double *y_grid)
int FlowCtx::event_handler( flow_eEvent event, int x, int y, int w, int h) int FlowCtx::event_handler( flow_eEvent event, int x, int y, int w, int h)
{ {
int sts; int sts = 0;
int i; int i;
FlowCtx *ctx; FlowCtx *ctx;
int node_move_event = 0; int node_move_event = 0;
......
...@@ -342,7 +342,7 @@ void FlowNode::open( ifstream& fp) ...@@ -342,7 +342,7 @@ void FlowNode::open( ifstream& fp)
{ {
if ((c = fp.get()) == '"') if ((c = fp.get()) == '"')
{ {
if ( annotv[i][j-1] == '\\') if ( j > 0 && annotv[i][j-1] == '\\')
j--; j--;
else else
{ {
......
...@@ -50,8 +50,8 @@ class FlowTipText { ...@@ -50,8 +50,8 @@ class FlowTipText {
/*! /*!
\param gctx Flow context. \param gctx Flow context.
*/ */
FlowTipText( FlowCtx *gctx) : ctx(gctx), tiptext_rows(0), active(false), timer_id(0), FlowTipText( FlowCtx *gctx) : ctx(gctx), text_object(0), tiptext_rows(0),
text_size(2) {} active(false), timer_id(0), text_size(2) {}
//! Destructor //! Destructor
/*! Removes the timer if it is set. /*! Removes the timer if it is set.
......
...@@ -249,7 +249,7 @@ void GlowNode::open( ifstream& fp) ...@@ -249,7 +249,7 @@ void GlowNode::open( ifstream& fp)
{ {
if ((c = fp.get()) == '"') if ((c = fp.get()) == '"')
{ {
if ( annotv[i][j-1] == '\\') if ( j > 0 && annotv[i][j-1] == '\\')
j--; j--;
else else
{ {
......
...@@ -48,7 +48,8 @@ class GlowTipText { ...@@ -48,7 +48,8 @@ class GlowTipText {
/*! /*!
\param gctx Glow context. \param gctx Glow context.
*/ */
GlowTipText( GrowCtx *gctx) : ctx(gctx), active(false), timer_id(0), text_size(2) {} GlowTipText( GrowCtx *gctx) : ctx(gctx), text_object(0), active(false), timer_id(0),
text_size(2) {}
//! Destructor //! Destructor
/*! Removes the timer if it is set. /*! Removes the timer if it is set.
......
...@@ -121,6 +121,8 @@ XNavGtk::~XNavGtk() ...@@ -121,6 +121,8 @@ XNavGtk::~XNavGtk()
mcp = 0; mcp = 0;
} }
menu_tree_free(); menu_tree_free();
delete (ItemMenu *)root_item;
for ( int i = 0; i < brow_cnt; i++) { for ( int i = 0; i < brow_cnt; i++) {
brow_stack[i]->free_pixmaps(); brow_stack[i]->free_pixmaps();
brow_DeleteSecondaryCtx( brow_stack[i]->ctx); brow_DeleteSecondaryCtx( brow_stack[i]->ctx);
......
...@@ -1569,14 +1569,12 @@ ItemMenu::ItemMenu( XNavBrow *brow, const char *item_name, ...@@ -1569,14 +1569,12 @@ ItemMenu::ItemMenu( XNavBrow *brow, const char *item_name,
int ItemMenu::open_children( XNavBrow *brow, double x, double y) int ItemMenu::open_children( XNavBrow *brow, double x, double y)
{ {
int action_open; int action_open = 0;
if ( !is_root) if ( !is_root)
{ {
if ( !brow_IsOpen( node)) if ( !brow_IsOpen( node))
action_open = 1; action_open = 1;
else
action_open = 0;
} }
if ( action_open || is_root) if ( action_open || is_root)
{ {
......
Markdown is supported
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