aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger
diff options
context:
space:
mode:
Diffstat (limited to 'debugger')
-rw-r--r--debugger/QT/SkDebuggerGUI.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 9e212981a7..01d8c665e3 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);