X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Fmwindow.C;h=381b0c1afe7c0d1486f8523b7f79a40bbc7174d4;hb=190b4810ec184c74ceab3fcd6faf09a91c92c53c;hp=adb7a87aaa868e746eb879ab5bda531c2fa6a459;hpb=87141f1b454130848c34efdea9cf832d17463830;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index adb7a87a..381b0c1a 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -1407,29 +1407,13 @@ SET_TRACE } // Test existing EDLs - if(result) - { - for(int j = 0; j < new_edls.total + 1; j++) - { - Asset *old_asset; - if(j == new_edls.total) - { - old_asset = edl->assets->get_asset(new_asset->path); - if( old_asset ) - { - *new_asset = *old_asset; - result = 0; - } - } - else - { - old_asset = new_edls[j]->assets->get_asset(new_asset->path); - if( old_asset ) - { - *new_asset = *old_asset; - result = 0; - } - } + for(int j = 0; result && j <= new_edls.total; j++) { + Asset *old_asset = j < new_edls.total ? + new_edls[j]->assets->get_asset(new_asset->path) : + edl->assets->get_asset(new_asset->path); + if( old_asset ) { + *new_asset = *old_asset; + result = 0; } }