png img proxy fixes, speed zoom segv fix, colapse ins 1frm silence undo, repair rende...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / mainerror.C
index ceeffc4a5ee38378ff0530fe8006bf6a09d7b0ae..eec7f8a1b66f87c8161b2874c14637f1131c58d3 100644 (file)
@@ -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");
 }