Remove doubled call of freeEverything. restore freeing of LandBackSurface pending unc0rr explaining why 'sactly he took it out (assuming an error right now)
#include <QtGui/QApplication>
#include "editor.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
editor w;
w.show();
return a.exec();
}