summaryrefslogtreecommitdiff
path: root/libs/ui/FramebufferNativeWindow.cpp
diff options
context:
space:
mode:
author Phil Dubach <phillipd@google.com> 2009-06-17 15:27:42 -0700
committer Phil Dubach <phillipd@google.com> 2009-06-17 18:26:32 -0700
commit4566b79736f236c0f605c57130d1fa954f4642d6 (patch)
tree38640c9b8dc0cbdc958350d6023bd7df64ec90d0 /libs/ui/FramebufferNativeWindow.cpp
parent3f4263fac6bcc68b3c7fff8e6ac9ad2d97b2ad4c (diff)
Fix Canvas.finalize() for the case where the constructor throws an exception
before the native canvas instance was created. If the canvas constructors throw an exception (because the bitmap passed in is immutable or already recycled), the constructor terminates early without allocating the native canvas instance. For the most part, that's okay, since the Canvas instance will never be returned to the application. However, the GC will still call finalize() on the half-initialized Canvas. The native methods for Canvas all assume that the canvas pointer passed down is not null.
Diffstat (limited to 'libs/ui/FramebufferNativeWindow.cpp')
0 files changed, 0 insertions, 0 deletions