diff options
Diffstat (limited to 'qt/ScintillaEditBase/ScintillaQt.cpp')
-rw-r--r-- | qt/ScintillaEditBase/ScintillaQt.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/qt/ScintillaEditBase/ScintillaQt.cpp b/qt/ScintillaEditBase/ScintillaQt.cpp index 859396aa2..707862416 100644 --- a/qt/ScintillaEditBase/ScintillaQt.cpp +++ b/qt/ScintillaEditBase/ScintillaQt.cpp @@ -668,12 +668,11 @@ public: void paintEvent(QPaintEvent *) override { if (pct->inCallTipMode) { - Surface *surfaceWindow = Surface::Allocate(0); + std::unique_ptr<Surface> surfaceWindow = Surface::Allocate(0); surfaceWindow->Init(this); surfaceWindow->SetUnicodeMode(SC_CP_UTF8 == pct->codePage); surfaceWindow->SetDBCSMode(pct->codePage); - pct->PaintCT(surfaceWindow); - delete surfaceWindow; + pct->PaintCT(surfaceWindow.get()); } } |