[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-commit] /srv/bzr/gnash/trunk r9740: Fix for bug #24265 (crash
From: |
strk |
Subject: |
Re: [Gnash-commit] /srv/bzr/gnash/trunk r9740: Fix for bug #24265 (crash loading malformed jpeg). |
Date: |
Mon, 15 Sep 2008 12:03:05 +0200 |
On Mon, Sep 15, 2008 at 11:05:23AM +0200, Benjamin Wolsey wrote:
> + try
> + {
> + switch (inChannel->imageType())
> + {
> + case GNASH_IMAGE_RGB:
> + im.reset(new image::ImageRGB(width, height));
> + break;
> + case GNASH_IMAGE_RGBA:
> + im.reset(new image::ImageRGBA(width, height));
> + break;
> + default:
> + log_error("Invalid image returned");
> + return im;
> + }
> + }
> + catch (std::bad_alloc& e)
> + {
> + return im;
> }
Was the catch really needed here ?
If it was, shouldn't we catch std::exception directly ?
--strk;