X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmainerror.C;h=eec7f8a1b66f87c8161b2874c14637f1131c58d3;hb=5621db270ccbeabc106e0f438941dba6f930652b;hp=ceeffc4a5ee38378ff0530fe8006bf6a09d7b0ae;hpb=b75f0c6910f5f1e1094f17874cd404e3f0faee8c;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/mainerror.C b/cinelerra-5.1/cinelerra/mainerror.C index ceeffc4a..eec7f8a1 100644 --- a/cinelerra-5.1/cinelerra/mainerror.C +++ b/cinelerra-5.1/cinelerra/mainerror.C @@ -121,6 +121,7 @@ MainError::MainError(MWindow *mwindow) MainError::~MainError() { close_window(); + errors.remove_all_objects(); delete errors_lock; } @@ -192,13 +193,9 @@ void MainError::show_error_local(const char *string) void MainError::show_error(const char *string) { - if( main_error ) - main_error->show_error_local(string); - else { - printf("%s", string); - if( string[strlen(string) - 1] != '\n' ) - printf("\n"); - } + if( main_error ) main_error->show_error_local(string); + int len = strlen(string); + printf("%s%s", string, len>0 && string[len-1] == '\n' ? "" : "\n"); }