Changeset 81589 in webkit


Ignore:
Timestamp:
Mar 21, 2011 10:11:00 AM (13 years ago)
Author:
christian@webkit.org
Message:

WebKitIconDatabase may trigger crash in cairoImageSurfaceToGdkPixbuf
https://bugs.webkit.org/show_bug.cgi?id=56201

Reviewed by Martin Robinson.

  • platform/graphics/gtk/ImageGtk.cpp: Don't attempt to make a pixbuf

if there is no image.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r81587 r81589  
     12011-03-21  Christian Dywan  <christian@lanedo.com>
     2
     3        Reviewed by Martin Robinson.
     4
     5        WebKitIconDatabase may trigger crash in cairoImageSurfaceToGdkPixbuf
     6        https://bugs.webkit.org/show_bug.cgi?id=56201
     7
     8        * platform/graphics/gtk/ImageGtk.cpp: Don't attempt to make a pixbuf
     9            if there is no image.
     10
    1112011-03-21  Mario Sanchez Prada  <msanchez@igalia.com>
    212
  • trunk/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp

    r67981 r81589  
    153153GdkPixbuf* BitmapImage::getGdkPixbuf()
    154154{
    155     return cairoImageSurfaceToGdkPixbuf(frameAtIndex(currentFrame()));
     155    cairo_surface_t* frame = frameAtIndex(currentFrame());
     156    if (!frame)
     157        return 0;
     158    return cairoImageSurfaceToGdkPixbuf(frame);
    156159}
    157160
Note: See TracChangeset for help on using the changeset viewer.