From a88a0ddaac6d37ed71f395f5a421f9b6edc60f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Wed, 18 Jan 2012 19:49:03 +0000 Subject: [PATCH] paysages: Fixed a possible segfault on exit. git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@227 b1fd45b6-86a6-48da-8261-f70d1f35bdcc --- gui_qt/mainwindow.cpp | 2 +- gui_qt/preview.cpp | 5 +++++ gui_qt/preview.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gui_qt/mainwindow.cpp b/gui_qt/mainwindow.cpp index 13e9f91..0e31607 100644 --- a/gui_qt/mainwindow.cpp +++ b/gui_qt/mainwindow.cpp @@ -87,6 +87,6 @@ void MainWindow::quickPreview() { DialogRender* dialog = new DialogRender(this); dialog->startRender(3, 400, 300); - + delete dialog; } diff --git a/gui_qt/preview.cpp b/gui_qt/preview.cpp index 2a86015..571ac56 100644 --- a/gui_qt/preview.cpp +++ b/gui_qt/preview.cpp @@ -70,6 +70,11 @@ Preview::~Preview() delete pixbuf; } +QColor Preview::getColor(double x, double y) +{ + return QColor(0, 0, 0); +} + void Preview::doRender() { if (this->alive) diff --git a/gui_qt/preview.h b/gui_qt/preview.h index 554c169..052ec95 100644 --- a/gui_qt/preview.h +++ b/gui_qt/preview.h @@ -21,7 +21,7 @@ public: protected: void resizeEvent(QResizeEvent* event); void paintEvent(QPaintEvent* event); - virtual QColor getColor(double x, double y) = 0; + virtual QColor getColor(double x, double y); void renderPixbuf(); void forceRender();