am 2b1aed10: Merge change 4527 into donut
Merge commit '2b1aed1021fb472de83c4c0143f2c4452244a0af' * commit '2b1aed1021fb472de83c4c0143f2c4452244a0af': Fix Canvas.finalize() for the case where the constructor throws an exception
This commit is contained in:
committed by
The Android Open Source Project
commit
903ccf479f
@@ -1404,7 +1404,11 @@ public class Canvas {
|
||||
|
||||
protected void finalize() throws Throwable {
|
||||
super.finalize();
|
||||
finalizer(mNativeCanvas);
|
||||
// If the constructor threw an exception before setting mNativeCanvas, the native finalizer
|
||||
// must not be invoked.
|
||||
if (mNativeCanvas != 0) {
|
||||
finalizer(mNativeCanvas);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user