summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-10 22:00:18 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-10 22:00:41 +0100
commit8cfa3f4b522d54845d2218610919e721bfb6f632 (patch)
treea80dcd78f48e3700d1904f31d2e54dbe48f2350a /test
parentd543b4df8084da777ea9624619d684a14cb91cb9 (diff)
'make screenshot' use-after-free fixes
Change-Id: I4302d0d767a1bf50fd34a78e9aa0ad6d6b0c7a22
Diffstat (limited to 'test')
-rw-r--r--test/source/screenshot_test.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx
index 650b9cd70912..df107b8f080d 100644
--- a/test/source/screenshot_test.cxx
+++ b/test/source/screenshot_test.cxx
@@ -107,9 +107,8 @@ void ScreenshotTest::saveScreenshot(Dialog& rDialog)
}
}
-VclAbstractDialog* ScreenshotTest::createDialogByName(const OString& rName)
+VclPtr<VclAbstractDialog> ScreenshotTest::createDialogByName(const OString& rName)
{
- VclAbstractDialog* pRetval = nullptr;
const mapType::const_iterator aHit = maKnownDialogs.find(rName);
if (aHit != maKnownDialogs.end())
@@ -117,7 +116,7 @@ VclAbstractDialog* ScreenshotTest::createDialogByName(const OString& rName)
return createDialogByID((*aHit).second);
}
- return pRetval;
+ return VclPtr<VclAbstractDialog>();
}
void ScreenshotTest::dumpDialogToPath(VclAbstractDialog& rDialog)