From 84fce187b0ae79adc5b4e64c26f72c8ed59e9703 Mon Sep 17 00:00:00 2001
From: Romain Guy <romainguy@google.com>
Date: Wed, 18 Jan 2012 18:09:54 -0800
Subject: Don't crash on Canvas.drawPicture()

Implementation yet to come but prevent app crashes.

Change-Id: I81d6851ebf776a98e13c606bab272a03aec406ee
---
 graphics/java/android/graphics/Picture.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'graphics/java')

diff --git a/graphics/java/android/graphics/Picture.java b/graphics/java/android/graphics/Picture.java
index bbb2dbf..9c06fed 100644
--- a/graphics/java/android/graphics/Picture.java
+++ b/graphics/java/android/graphics/Picture.java
@@ -123,7 +123,11 @@ public class Picture {
     }
 
     protected void finalize() throws Throwable {
-        nativeDestructor(mNativePicture);
+        try {
+            nativeDestructor(mNativePicture);
+        } finally {
+            super.finalize();
+        }
     }
     
     /*package*/ final int ni() {
-- 
cgit v1.1