Commit 0481bce7 authored by claes's avatar claes

Segfault for uninitialized trend avoided

parent b2fc4718
/* /*
* Proview $Id: xtt_trend_gtk.cpp,v 1.1 2007-01-04 08:29:32 claes Exp $ * Proview $Id: xtt_trend_gtk.cpp,v 1.2 2007-11-01 15:36:05 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -52,6 +52,8 @@ XttTrendGtk::XttTrendGtk( void *parent_ctx, ...@@ -52,6 +52,8 @@ XttTrendGtk::XttTrendGtk( void *parent_ctx,
int *sts) : int *sts) :
XttTrend( parent_ctx, name, trend_list, plotgroup, sts), parent_widget(parent_wid) XttTrend( parent_ctx, name, trend_list, plotgroup, sts), parent_widget(parent_wid)
{ {
if ( EVEN(*sts))
return;
*sts = XNAV__SUCCESS; *sts = XNAV__SUCCESS;
curve = new GeCurveGtk( this, parent_widget, name, NULL, gcd, 1); curve = new GeCurveGtk( this, parent_widget, name, NULL, gcd, 1);
......
/* /*
* Proview $Id: xtt_trend_motif.cpp,v 1.1 2007-01-04 08:30:03 claes Exp $ * Proview $Id: xtt_trend_motif.cpp,v 1.2 2007-11-01 15:36:05 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -67,6 +67,8 @@ XttTrendMotif::XttTrendMotif( void *parent_ctx, ...@@ -67,6 +67,8 @@ XttTrendMotif::XttTrendMotif( void *parent_ctx,
int *sts) : int *sts) :
XttTrend( parent_ctx, name, trend_list, plotgroup, sts), parent_widget(parent_wid) XttTrend( parent_ctx, name, trend_list, plotgroup, sts), parent_widget(parent_wid)
{ {
if ( EVEN(*sts))
return;
*sts = XNAV__SUCCESS; *sts = XNAV__SUCCESS;
curve = new GeCurveMotif( this, parent_widget, name, NULL, gcd, 1); curve = new GeCurveMotif( this, parent_widget, name, NULL, gcd, 1);
......
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