diff --git a/common/gal/opengl/antialiasing.cpp b/common/gal/opengl/antialiasing.cpp index f32be0b724..13dabd6ff5 100644 --- a/common/gal/opengl/antialiasing.cpp +++ b/common/gal/opengl/antialiasing.cpp @@ -127,8 +127,8 @@ namespace { ANTIALIASING_SUPERSAMPLING::ANTIALIASING_SUPERSAMPLING( OPENGL_COMPOSITOR* aCompositor, SUPERSAMPLING_MODE aMode ) - : compositor( aCompositor ), mode( aMode ), areBuffersCreated( false ), - areShadersCreated( false ) + : compositor( aCompositor ), mode( aMode ), ssaaMainBuffer( 0 ), + areBuffersCreated( false ), areShadersCreated( false ) { } @@ -234,6 +234,15 @@ ANTIALIASING_SMAA::ANTIALIASING_SMAA( OPENGL_COMPOSITOR* aCompositor, SMAA_QUALI : areBuffersInitialized( false ), shadersLoaded( false ), quality( aQuality ), compositor( aCompositor ) { + smaaBaseBuffer = 0; + smaaEdgesBuffer = 0; + smaaBlendBuffer = 0; + smaaAreaTex = 0; + smaaSearchTex = 0; + + pass_1_metrics = 0; + pass_2_metrics = 0; + pass_3_metrics = 0; } diff --git a/common/gal/opengl/antialiasing.h b/common/gal/opengl/antialiasing.h index e99186f29f..e3be899bef 100644 --- a/common/gal/opengl/antialiasing.h +++ b/common/gal/opengl/antialiasing.h @@ -35,6 +35,10 @@ namespace KIGFX { class OPENGL_PRESENTOR { public: + virtual ~OPENGL_PRESENTOR() + { + } + virtual bool Init() = 0; virtual unsigned int CreateBuffer() = 0; diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index a91dc2c337..aeb5c76e00 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -38,7 +38,8 @@ using namespace KIGFX; OPENGL_COMPOSITOR::OPENGL_COMPOSITOR() : m_initialized( false ), m_curBuffer( 0 ), - m_mainFbo( 0 ), m_depthBuffer( 0 ), m_curFbo( DIRECT_RENDERING ) + m_mainFbo( 0 ), m_depthBuffer( 0 ), m_curFbo( DIRECT_RENDERING ), + m_currentAntialiasingMode( OPENGL_ANTIALIASING_MODE::NONE ) { m_antialiasing.reset( new ANTIALIASING_NONE( this ) ); } diff --git a/common/observable.cpp b/common/observable.cpp index fe788900c3..b172a75fc9 100644 --- a/common/observable.cpp +++ b/common/observable.cpp @@ -28,7 +28,7 @@ namespace UTIL { namespace DETAIL { - template< typename T > + template struct equals { equals( const T& val ) : val_( val ) {} @@ -96,6 +96,12 @@ namespace UTIL { { auto it = std::find( observers_.begin(), observers_.end(), observer ); + if( it == observers_.end() ) + { + assert( false ); + return; + } + if( is_iterating() ) *it = nullptr; else @@ -112,6 +118,7 @@ namespace UTIL { LINK::LINK() + : observer_( nullptr ) { } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 3235abbccb..f46bf85fdc 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -49,6 +49,7 @@ PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() m_netNamesOnPads = true; m_netNamesOnTracks = true; m_displayZone = DZ_SHOW_FILLED; + m_clearance = CL_NONE; // By default everything should be displayed as filled for( unsigned int i = 0; i < TOTAL_LAYER_COUNT; ++i ) diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index 7ce848b7c6..5816ce9588 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -454,6 +454,7 @@ PNS_KICAD_IFACE::PNS_KICAD_IFACE() m_world = nullptr; m_router = nullptr; m_debugDecorator = nullptr; + m_dispOptions = nullptr; }