← Back to team overview

kicad-developers team mailing list archive

patch: pcbnew. fix memory leak in printing dialog

 

If user tries to generate print preview with no layer selected, *preview object not destroyed and memory leaks.


--
Regards,
  Sergey A. Borshch            mailto: sb-sf@xxxxxxxxxxxxxxx
    SB ELDI ltd. Riga, Latvia
=== modified file 'pcbnew/dialogs/dialog_print_using_printer.cpp'
--- pcbnew/dialogs/dialog_print_using_printer.cpp	2012-11-29 01:50:58 +0000
+++ pcbnew/dialogs/dialog_print_using_printer.cpp	2013-03-11 00:32:29 +0000
@@ -449,6 +452,7 @@
     if( s_Parameters.m_PrintMaskLayer == 0 )
     {
         DisplayError( this, _( "No layer selected" ) );
+        delete preview;
         return;
     }


Follow ups