summaryrefslogtreecommitdiff
path: root/client/mainwindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/mainwindow.cc')
-rw-r--r--client/mainwindow.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc
index 49cd634..8d7c04f 100644
--- a/client/mainwindow.cc
+++ b/client/mainwindow.cc
@@ -165,12 +165,11 @@ void MainWindow::snapshot_clicked()
char rgb[720 * 576 * 4];
- QImage *screenshot = new QImage((uchar*)rgb, 720, 576, QImage::Format_RGB32);
+ QImage screenshot((uchar*)rgb, 720, 576, QImage::Format_RGB32);
decoder->snapshot(rgb);
QPixmap *p = new QPixmap();
- *p = QPixmap::fromImage(*screenshot);
- delete screenshot;
+ *p = QPixmap::fromImage(screenshot);
history->addHistoryItem(new HistoryWidget(p));
}