Chromium Code Reviews| Index: samplecode/SampleApp.cpp |
| diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp |
| index 1b4a55e5dd0a88d93d6fc730e9223d20e9c6528d..d44786ee9c7141a32e2fff4e15bc75a38d30ea03 100644 |
| --- a/samplecode/SampleApp.cpp |
| +++ b/samplecode/SampleApp.cpp |
| @@ -259,8 +259,11 @@ public: |
| virtual void tearDownBackend(SampleWindow *win) { |
| #if SK_SUPPORT_GPU |
| - SkSafeUnref(fCurContext); |
| - fCurContext = NULL; |
| + if (fCurContext) { |
| + // in case we have outstanding refs to this guy (lua?) |
| + fCurContext->abandonContext(); |
|
robertphillips
2014/10/30 14:18:04
I think we still need to unref this guy.
|
| + fCurContext = NULL; |
| + } |
| SkSafeUnref(fCurIntf); |
| fCurIntf = NULL; |