diff --git a/3d-viewer/vrml_v1_modelparser.cpp b/3d-viewer/vrml_v1_modelparser.cpp index 97cc69bfdb..d7480ad164 100644 --- a/3d-viewer/vrml_v1_modelparser.cpp +++ b/3d-viewer/vrml_v1_modelparser.cpp @@ -41,6 +41,9 @@ VRML1_MODEL_PARSER::VRML1_MODEL_PARSER( S3D_MASTER* aMaster ) : { m_model = NULL; m_file = NULL; + m_Materials = NULL; + m_normalPerVertex = true; + colorPerVertex = true; } diff --git a/3d-viewer/vrml_v2_modelparser.cpp b/3d-viewer/vrml_v2_modelparser.cpp index f648f08605..5ca57075e6 100644 --- a/3d-viewer/vrml_v2_modelparser.cpp +++ b/3d-viewer/vrml_v2_modelparser.cpp @@ -253,15 +253,14 @@ int VRML2_MODEL_PARSER::read_Transform() } -/** - * Read the DEF for a Coordinate - */ int VRML2_MODEL_PARSER::read_DEF_Coordinate() { char text[128]; // Get the name of the definition. - GetNextTag( m_file, text, sizeof(text) ); + if( !GetNextTag( m_file, text, sizeof(text) ) ) + return -1; + std::string coordinateName = text; while( GetNextTag( m_file, text, sizeof(text) ) ) @@ -291,7 +290,8 @@ int VRML2_MODEL_PARSER::read_DEF() { char text[128]; - GetNextTag( m_file, text, sizeof(text) ); + if( !GetNextTag( m_file, text, sizeof(text) ) ) + return -1; while( GetNextTag( m_file, text, sizeof(text) ) ) { @@ -348,7 +348,9 @@ int VRML2_MODEL_PARSER::read_USE() char text[128]; // Get the name of the definition. - GetNextTag( m_file, text, sizeof(text) ); + if( !GetNextTag( m_file, text, sizeof(text) ) ) + return -1; + std::string coordinateName = text; // Look for it in our coordinate map. diff --git a/3d-viewer/x3dmodelparser.cpp b/3d-viewer/x3dmodelparser.cpp index 8a71777fae..90ea3d6189 100644 --- a/3d-viewer/x3dmodelparser.cpp +++ b/3d-viewer/x3dmodelparser.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2013 Tuomas Vaherkoski - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -44,6 +44,7 @@ X3D_MODEL_PARSER::X3D_MODEL_PARSER( S3D_MASTER* aMaster ) : S3D_MODEL_PARSER( aMaster ) { + m_model = NULL; } @@ -52,7 +53,7 @@ X3D_MODEL_PARSER::~X3D_MODEL_PARSER() } -void X3D_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3Dunits ) +void X3D_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlUnitsTo3DUnits ) { wxXmlDocument doc; @@ -69,7 +70,7 @@ void X3D_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3Du } - float vrmlunits_to_3Dunits = aVrmlunits_to_3Dunits; + float vrmlunits_to_3Dunits = aVrmlUnitsTo3DUnits; glScalef( vrmlunits_to_3Dunits, vrmlunits_to_3Dunits, vrmlunits_to_3Dunits ); glm::vec3 matScale( GetMaster()->m_MatScale.x, GetMaster()->m_MatScale.y, diff --git a/common/fp_lib_table.cpp b/common/fp_lib_table.cpp index 4f7277b74d..3b7f7e5d7d 100644 --- a/common/fp_lib_table.cpp +++ b/common/fp_lib_table.cpp @@ -1,9 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2010-12 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2010-2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2012 Wayne Stambaugh - * Copyright (C) 2012 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2012-2015 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -701,7 +701,8 @@ const wxString FP_LIB_TABLE::GlobalPathEnvVariableName() } -bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable ) throw (IO_ERROR, PARSE_ERROR ) +bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable ) + throw (IO_ERROR, PARSE_ERROR, boost::interprocess::lock_exception ) { bool tableExists = true; wxFileName fn = GetGlobalTableFileName(); diff --git a/eeschema/class_library.cpp b/eeschema/class_library.cpp index f2822c9a71..2d7ba0ce0a 100644 --- a/eeschema/class_library.cpp +++ b/eeschema/class_library.cpp @@ -806,7 +806,8 @@ PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName ) throw( IO_ERROR, bo } -PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName, PART_LIBS::iterator& aIterator ) throw( IO_ERROR ) +PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName, PART_LIBS::iterator& aIterator ) + throw( IO_ERROR, boost::bad_pointer ) { #if 1 // Don't reload the library if it is already loaded. diff --git a/eeschema/class_library.h b/eeschema/class_library.h index 3819c1de05..565c813ed3 100644 --- a/eeschema/class_library.h +++ b/eeschema/class_library.h @@ -134,8 +134,8 @@ public: * @return PART_LIB* - the new PART_LIB, which remains owned by this PART_LIBS container. * @throw IO_ERROR if there's any problem loading. */ - PART_LIB* AddLibrary( const wxString& aFileName, - PART_LIBS::iterator& aIterator ) throw( IO_ERROR ); + PART_LIB* AddLibrary( const wxString& aFileName, PART_LIBS::iterator& aIterator ) + throw( IO_ERROR, boost::bad_pointer ); /** * Function RemoveLibrary diff --git a/eeschema/dialogs/dialog_erc.cpp b/eeschema/dialogs/dialog_erc.cpp index 754fa185e3..c745ee6495 100644 --- a/eeschema/dialogs/dialog_erc.cpp +++ b/eeschema/dialogs/dialog_erc.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2012 Wayne Stambaugh - * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -66,6 +66,7 @@ DIALOG_ERC::DIALOG_ERC( SCH_EDIT_FRAME* parent ) : ) { m_parent = parent; + m_lastMarkerFound = NULL; Init(); GetSizer()->SetSizeHints( this ); diff --git a/eeschema/hierarch.cpp b/eeschema/hierarch.cpp index 6edb284388..6f6b44c89e 100644 --- a/eeschema/hierarch.cpp +++ b/eeschema/hierarch.cpp @@ -71,7 +71,12 @@ private: wxImageList* imageList; public: - HIERARCHY_TREE() { } + HIERARCHY_TREE() + { + m_Parent = NULL; + imageList = NULL; + } + HIERARCHY_TREE( HIERARCHY_NAVIG_DLG* parent ); DECLARE_DYNAMIC_CLASS( HIERARCHY_TREE ) diff --git a/eeschema/lib_arc.cpp b/eeschema/lib_arc.cpp index 25b6b706bd..f0aa84d66a 100644 --- a/eeschema/lib_arc.cpp +++ b/eeschema/lib_arc.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -95,6 +95,9 @@ LIB_ARC::LIB_ARC( LIB_PART* aParent ) : LIB_ITEM( LIB_ARC_T, aParent ) m_typeName = _( "Arc" ); m_editState = 0; m_lastEditState = 0; + m_editCenterDistance = 0.0; + m_editSelectPoint = ARC_STATUS_START; + m_editDirection = 0; } diff --git a/eeschema/lib_polyline.cpp b/eeschema/lib_polyline.cpp index 93efca8863..8dae0a7580 100644 --- a/eeschema/lib_polyline.cpp +++ b/eeschema/lib_polyline.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -51,6 +51,7 @@ LIB_POLYLINE::LIB_POLYLINE( LIB_PART* aParent ) : m_Width = 0; m_isFillable = true; m_typeName = _( "PolyLine" ); + m_ModifyIndex = 0; } diff --git a/eeschema/sch_collectors.h b/eeschema/sch_collectors.h index d94020c7f7..0f7dba2441 100644 --- a/eeschema/sch_collectors.h +++ b/eeschema/sch_collectors.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 20011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2011-2015 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -255,6 +255,7 @@ public: SetScanTypes( aScanTypes ); m_foundIndex = 0; m_forceSearch = false; + m_sheetPath = NULL; } void Empty() diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index 49270cccf3..e9f137b590 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -182,6 +182,7 @@ SCH_COMPONENT::SCH_COMPONENT( LIB_PART& aPart, SCH_SHEET_PATH* sheet, int unit, SCH_COMPONENT::SCH_COMPONENT( const SCH_COMPONENT& aComponent ) : SCH_ITEM( aComponent ) { + m_currentSheetPath = NULL; m_Parent = aComponent.m_Parent; m_Pos = aComponent.m_Pos; m_unit = aComponent.m_unit; diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index 6d0d24d66c..1d53fd080f 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -3,8 +3,8 @@ * * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2008-2013 Wayne Stambaugh - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2008-2015 Wayne Stambaugh + * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -94,6 +94,8 @@ SCH_SCREEN::SCH_SCREEN( KIWAY* aKiway ) : KIWAY_HOLDER( aKiway ), m_paper( wxT( "A4" ) ) { + m_modification_sync = 0; + SetZoom( 32 ); for( unsigned i = 0; i < DIM( SchematicZoomList ); i++ ) diff --git a/gerbview/draw_gerber_screen.cpp b/gerbview/draw_gerber_screen.cpp index 2fdc48d058..e5dba34896 100644 --- a/gerbview/draw_gerber_screen.cpp +++ b/gerbview/draw_gerber_screen.cpp @@ -2,8 +2,8 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2013 Jean-Pierre Charras, jpierre.charras at wanadoo - * Copyright (C) 2013 Wayne Stambaugh - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013-2015 Wayne Stambaugh + * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -46,6 +46,8 @@ void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, bool aPrintMirrorMode, void* aData ) { + wxCHECK_RET( aData != NULL, wxT( "aDate cannot be NULL." ) ); + // Save current draw options, because print mode has specific options: GBR_DISPLAY_OPTIONS imgDisplayOptions = m_DisplayOptions; std::bitset printLayersMask = GetGerberLayout()->GetPrintableLayers(); @@ -63,7 +65,7 @@ void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, printCurrLayerMask.set(printParameters->m_Flags); // m_Flags contains the draw layer number GetGerberLayout()->SetPrintableLayers( printCurrLayerMask ); m_canvas->SetPrintMirrored( aPrintMirrorMode ); - bool printBlackAndWhite = printParameters && printParameters->m_Print_Black_and_White; + bool printBlackAndWhite = printParameters->m_Print_Black_and_White; GetGerberLayout()->Draw( m_canvas, aDC, UNSPECIFIED_DRAWMODE, wxPoint( 0, 0 ), printBlackAndWhite ); diff --git a/include/fp_lib_table.h b/include/fp_lib_table.h index ac5457a60d..a56897a79f 100644 --- a/include/fp_lib_table.h +++ b/include/fp_lib_table.h @@ -1,9 +1,9 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2010-12 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2010-2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2012 Wayne Stambaugh - * Copyright (C) 2012 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2012-2015 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -538,7 +538,8 @@ public: * @throw IO_ERROR if an error occurs attempting to load the footprint library * table. */ - static bool LoadGlobalTable( FP_LIB_TABLE& aTable ) throw (IO_ERROR, PARSE_ERROR ); + static bool LoadGlobalTable( FP_LIB_TABLE& aTable ) + throw (IO_ERROR, PARSE_ERROR, boost::interprocess::lock_exception ); /** * Function GetGlobalTableFileName diff --git a/include/msgpanel.h b/include/msgpanel.h index f2cfe16e3a..31478f28e5 100644 --- a/include/msgpanel.h +++ b/include/msgpanel.h @@ -3,7 +3,7 @@ * * Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2011-2012 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -69,11 +69,19 @@ public: m_Color( aColor ), m_Pad( aPad ) { + m_X = 0; + m_UpperY = 0; + m_LowerY = 0; } MSG_PANEL_ITEM() : m_Pad( MSG_PANEL_DEFAULT_PAD ) + { + m_X = 0; + m_UpperY = 0; + m_LowerY = 0; + m_Color = UNSPECIFIED_COLOR; } void SetUpperText( const wxString& aUpperText ) { m_UpperText = aUpperText; } diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index a79f78431d..2036c1af1f 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -8,7 +8,7 @@ * * Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2013 CERN (www.cern.ch) - * Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index f77d9df8d7..8ce84f4de6 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2012 Wayne Stambaugh - * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -117,6 +117,9 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, return; PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) aPanel->GetParent(); + + wxCHECK_RET( frame != NULL, wxT( "Panel has no parent frame window." ) ); + DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)frame->GetDisplayOptions(); PCB_SCREEN* screen = frame->GetScreen(); @@ -126,6 +129,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, drawInfo.m_ShowPadFilled = true; EDA_COLOR_T color = BLACK; + if( m_layerMask[F_Cu] ) { color = brd->GetVisibleElementColor( PAD_FR_VISIBLE ); @@ -169,7 +173,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, displ_opts && displ_opts->m_ContrastModeDisplay ) { // when routing tracks - if( frame && frame->GetToolId() == ID_TRACK_BUTT ) + if( frame->GetToolId() == ID_TRACK_BUTT ) { LAYER_ID routeTop = screen->m_Route_Layer_TOP; LAYER_ID routeBot = screen->m_Route_Layer_BOTTOM; diff --git a/pcbnew/class_pcb_layer_box_selector.h b/pcbnew/class_pcb_layer_box_selector.h index f26f732121..559633c711 100644 --- a/pcbnew/class_pcb_layer_box_selector.h +++ b/pcbnew/class_pcb_layer_box_selector.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2012-2014 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr - * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -56,6 +56,7 @@ public: LAYER_BOX_SELECTOR( parent, id, pos, size, n, choices ) { m_boardFrame = NULL; + m_hotkeys = NULL; } // Accessors diff --git a/pcbnew/class_pcb_text.cpp b/pcbnew/class_pcb_text.cpp index 12c86fa565..1f17a531b6 100644 --- a/pcbnew/class_pcb_text.cpp +++ b/pcbnew/class_pcb_text.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -119,19 +119,9 @@ void TEXTE_PCB::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { wxString msg; -#if defined(__WXDEBUG__) - BOARD_ITEM* parent = (BOARD_ITEM*) m_Parent; - wxASSERT( parent ); + wxCHECK_RET( m_Parent != NULL, wxT( "TEXTE_PCB::GetMsgPanelInfo() m_Parent is NULL." ) ); - BOARD* board; - if( parent->Type() == PCB_DIMENSION_T ) - board = (BOARD*) parent->GetParent(); - else - board = (BOARD*) parent; - wxASSERT( board ); -#endif - - if( m_Parent && m_Parent->Type() == PCB_DIMENSION_T ) + if( m_Parent->Type() == PCB_DIMENSION_T ) aList.push_back( MSG_PANEL_ITEM( _( "Dimension" ), GetShownText(), DARKGREEN ) ); else aList.push_back( MSG_PANEL_ITEM( _( "PCB Text" ), GetShownText(), DARKGREEN ) ); diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index f6c33ff06d..7ca3e46f1f 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2012 Wayne Stambaugh - * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -762,9 +762,10 @@ unsigned int TRACK::ViewGetLOD( int aLayer ) const } -void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, - const wxPoint& aOffset ) +void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aOffset ) { + wxCHECK_RET( panel != NULL, wxT( "VIA::Draw panel cannot be NULL." ) ); + int radius; LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; @@ -967,10 +968,11 @@ void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, if( aDC->LogicalToDeviceXRel( tsize ) >= MIN_TEXT_SIZE ) { tsize = (tsize * 7) / 10; // small reduction to give a better look, inside via + if( (aDrawMode & GR_XOR) == 0 ) GRSetDrawMode( aDC, GR_COPY ); - EDA_RECT* clipbox = panel? panel->GetClipBox() : NULL; + EDA_RECT* clipbox = panel->GetClipBox(); DrawGraphicHaloText( clipbox, aDC, m_Start, color, WHITE, BLACK, net->GetShortNetname(), 0, wxSize( tsize, tsize ), diff --git a/pcbnew/kicad_netlist_reader.cpp b/pcbnew/kicad_netlist_reader.cpp index e9902e340b..c6a4607534 100644 --- a/pcbnew/kicad_netlist_reader.cpp +++ b/pcbnew/kicad_netlist_reader.cpp @@ -81,7 +81,7 @@ void KICAD_NETLIST_PARSER::skipCurrent() throw( IO_ERROR, PARSE_ERROR ) } -void KICAD_NETLIST_PARSER::Parse() throw( IO_ERROR, PARSE_ERROR ) +void KICAD_NETLIST_PARSER::Parse() throw( IO_ERROR, PARSE_ERROR, boost::bad_pointer ) { wxString text; diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 9771aeda8f..af75a7876d 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -4,7 +4,7 @@ * * Copyright (C) 2007-2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2004 Jean-Pierre Charras, jp.charras@wanadoo.fr - * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 1992-2015 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -3051,6 +3051,7 @@ double LEGACY_PLUGIN::degParse( const char* aValue, const char** nptrptr ) void LEGACY_PLUGIN::init( const PROPERTIES* aProperties ) { + m_loading_format_version = 0; m_cu_count = 16; m_board = NULL; m_props = aProperties; diff --git a/pcbnew/netlist_reader.h b/pcbnew/netlist_reader.h index df5ce5d761..f473aae006 100644 --- a/pcbnew/netlist_reader.h +++ b/pcbnew/netlist_reader.h @@ -359,7 +359,7 @@ public: * Function Parse * parse the full netlist */ - void Parse() throw( IO_ERROR, PARSE_ERROR ); + void Parse() throw( IO_ERROR, PARSE_ERROR, boost::bad_pointer ); // Useful for debug only: const char* getTokenName( NL_T::T aTok ) diff --git a/pcbnew/specctra.cpp b/pcbnew/specctra.cpp index 0b7b1041d5..c7ddafce3e 100644 --- a/pcbnew/specctra.cpp +++ b/pcbnew/specctra.cpp @@ -3,7 +3,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2007-2011 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2007-2015 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -622,7 +622,7 @@ void SPECCTRA_DB::doLAYER_NOISE_WEIGHT( LAYER_NOISE_WEIGHT* growth ) } -void SPECCTRA_DB::doSTRUCTURE( STRUCTURE* growth ) throw( IO_ERROR ) +void SPECCTRA_DB::doSTRUCTURE( STRUCTURE* growth ) throw( IO_ERROR, boost::bad_pointer ) { T tok; diff --git a/pcbnew/specctra.h b/pcbnew/specctra.h index 4a50c4664d..35b1c19ba6 100644 --- a/pcbnew/specctra.h +++ b/pcbnew/specctra.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2007-2013 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2007-2015 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -3694,7 +3694,7 @@ class SPECCTRA_DB : public SPECCTRA_LEXER void doPARSER( PARSER* growth ) throw( IO_ERROR ); void doRESOLUTION( UNIT_RES* growth ) throw( IO_ERROR ); void doUNIT( UNIT_RES* growth ) throw( IO_ERROR ); - void doSTRUCTURE( STRUCTURE* growth ) throw( IO_ERROR ); + void doSTRUCTURE( STRUCTURE* growth ) throw( IO_ERROR, boost::bad_pointer ); void doSTRUCTURE_OUT( STRUCTURE_OUT* growth ) throw( IO_ERROR, boost::bad_pointer ); void doLAYER_NOISE_WEIGHT( LAYER_NOISE_WEIGHT* growth ) throw( IO_ERROR, boost::bad_pointer ); void doLAYER_PAIR( LAYER_PAIR* growth ) throw( IO_ERROR );