| Index: debugger/QT/SkDebuggerGUI.cpp
|
| diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
|
| index 9e212981a786751393832bdd42b4f6ff8f54e94e..01d8c665e35ce8877a12d1e1831793d0723c4c1a 100644
|
| --- a/debugger/QT/SkDebuggerGUI.cpp
|
| +++ b/debugger/QT/SkDebuggerGUI.cpp
|
| @@ -738,13 +738,12 @@ void SkDebuggerGUI::setupDirectoryWidget(const QString& path) {
|
| void SkDebuggerGUI::loadPicture(const SkString& fileName) {
|
| fFileName = fileName;
|
| fLoading = true;
|
| - SkStream* stream = SkNEW_ARGS(SkFILEStream, (fileName.c_str()));
|
| + SkAutoTDelete<SkStream> stream(SkNEW_ARGS(SkFILEStream, (fileName.c_str())));
|
|
|
| SkPicture* picture = SkPicture::CreateFromStream(stream);
|
|
|
| if (NULL == picture) {
|
| QMessageBox::critical(this, "Error loading file", "Couldn't read file, sorry.");
|
| - SkSafeUnref(stream);
|
| return;
|
| }
|
|
|
| @@ -756,7 +755,6 @@ void SkDebuggerGUI::loadPicture(const SkString& fileName) {
|
| fSkipCommands[i] = false;
|
| }
|
|
|
| - SkSafeUnref(stream);
|
| SkSafeUnref(picture);
|
|
|
| fActionProfile.setDisabled(false);
|
|
|