In the wiki:
http://wiki.codeblocks.org/index.php?title=Scripting_commands#ProjectFilebuildTargets
is a PUBLIC class variable to retrieve the targets file.
If we write ('prjfile' is a ProjectFile) :
local Targetsfile = prjfile.buildTargets
and after finishing with the local variable :
Targetsfile.Clear()
it may happen that the files are
REMOVED from the project !
The use of a PUBLIC class variable, in that event, causes side effects.
I enclose a 'Hello.cbp' with a test script that demonstrates this problem.
I suggest a fix for r9251
implement_GetbuildTargets_r9251.patch
Thank you for your answers.