mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
Added a check, preventing additional disposing.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2392 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
4be6799f4a
commit
8aeb07e1e9
1 changed files with 11 additions and 8 deletions
|
@ -125,15 +125,18 @@ namespace GreenshotPlugin.Core {
|
||||||
try {
|
try {
|
||||||
// The following block of modifications should be skipped when saving the greenshot format, no effects or otherwise!
|
// The following block of modifications should be skipped when saving the greenshot format, no effects or otherwise!
|
||||||
if (outputSettings.Format != OutputFormat.greenshot) {
|
if (outputSettings.Format != OutputFormat.greenshot) {
|
||||||
// apply effects, if there are any
|
Image tmpImage;
|
||||||
Point ignoreOffset;
|
if (outputSettings.Effects != null && outputSettings.Effects.Count > 0) {
|
||||||
Image tmpImage = ImageHelper.ApplyEffects((Bitmap)imageToSave, outputSettings.Effects, out ignoreOffset);
|
// apply effects, if there are any
|
||||||
if (tmpImage != null) {
|
Point ignoreOffset;
|
||||||
if (disposeImage) {
|
tmpImage = ImageHelper.ApplyEffects((Bitmap)imageToSave, outputSettings.Effects, out ignoreOffset);
|
||||||
imageToSave.Dispose();
|
if (tmpImage != null) {
|
||||||
|
if (disposeImage) {
|
||||||
|
imageToSave.Dispose();
|
||||||
|
}
|
||||||
|
imageToSave = tmpImage;
|
||||||
|
disposeImage = true;
|
||||||
}
|
}
|
||||||
imageToSave = tmpImage;
|
|
||||||
disposeImage = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Removing transparency if it's not supported in the output
|
// Removing transparency if it's not supported in the output
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue