Cleanup for code-analyses 2nd phase

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2483 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-02-13 11:45:51 +00:00
commit 5ffe3dfb42
15 changed files with 190 additions and 137 deletions

View file

@ -132,7 +132,12 @@ namespace Greenshot {
/// </summary>
public AboutForm() {
// Make sure our resources are removed again.
this.Disposed += delegate { Cleanup(); };
this.Disposed += delegate {
Cleanup();
};
this.FormClosing += delegate {
Cleanup();
};
// Enable animation for this form, when we don't set this the timer doesn't start as soon as the form is loaded.
EnableAnimation = true;
@ -228,6 +233,9 @@ namespace Greenshot {
/// Called from the AnimatingForm, for every frame
/// </summary>
protected override void Animate() {
if (gBitmap == null) {
return;
}
if (!isTerminalServerSession) {
// Color cycle
if (waitFrames != 0) {