Fix for Bug #3038512, only solving the symptom not the problem.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@795 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2010-08-07 15:18:10 +00:00
commit 32182ea348

View file

@ -38,7 +38,7 @@ namespace Greenshot.Helpers {
/// <param name="cropRectangle">Rectangle with bitmap coordinates, will be "intersected" to the bitmap</param>
public static void Crop(ref Image image, ref Rectangle cropRectangle) {
Image returnImage = null;
if (image != null && image is Bitmap) {
if (image != null && image is Bitmap && ((image.Width * image.Height) > 0)) {
cropRectangle.Intersect(new Rectangle(0,0, image.Width, image.Height));
returnImage = (image as Bitmap).Clone(cropRectangle, image.PixelFormat);
image.Dispose();