Fix FTBFS with clang

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 10 years ago
parent 26148c5125
commit 9a4419b617

@ -25,6 +25,7 @@
#include <tqpointarray.h>
#include <algorithm>
#include <cstdlib>
#include <tdetoolbar.h>

@ -544,7 +544,7 @@ void SQ_GLWidget::saveAs()
default: scgetter = SQ_GLHelpers::scanLine0;
}
RGBA scan[w];
RGBA *scan = new RGBA[w];
RGBA *data = tab->parts[tab->current].buffer->data();
fmt_image im2 = im;
@ -563,6 +563,7 @@ void SQ_GLWidget::saveAs()
if(err != SQE_OK)
{
KMessageBox::error(this, i18n("Error writing image"));
delete [] scan;
return;
}
@ -571,6 +572,7 @@ void SQ_GLWidget::saveAs()
if(err != SQE_OK)
{
KMessageBox::error(this, i18n("Error writing image"));
delete [] scan;
return;
}
@ -593,11 +595,13 @@ void SQ_GLWidget::saveAs()
{
wlib->codec->write_close();
KMessageBox::error(this, i18n("Error writing image"));
delete [] scan;
return;
}
}
wlib->codec->write_close();
delete [] scan;
// copy to non-local directory
if(!url.isLocalFile())

@ -25,6 +25,7 @@
#include <tqpointarray.h>
#include <algorithm>
#include <cstdlib>
#include <tdetoolbar.h>

@ -544,7 +544,7 @@ void SQ_GLWidget::saveAs()
default: scgetter = SQ_GLHelpers::scanLine0;
}
RGBA scan[w];
RGBA *scan = new RGBA[w];
RGBA *data = tab->parts[tab->current].buffer->data();
fmt_image im2 = im;
@ -563,6 +563,7 @@ void SQ_GLWidget::saveAs()
if(err != SQE_OK)
{
KMessageBox::error(this, i18n("Error writing image"));
delete [] scan;
return;
}
@ -571,6 +572,7 @@ void SQ_GLWidget::saveAs()
if(err != SQE_OK)
{
KMessageBox::error(this, i18n("Error writing image"));
delete [] scan;
return;
}
@ -593,11 +595,13 @@ void SQ_GLWidget::saveAs()
{
wlib->codec->write_close();
KMessageBox::error(this, i18n("Error writing image"));
delete [] scan;
return;
}
}
wlib->codec->write_close();
delete [] scan;
// copy to non-local directory
if(!url.isLocalFile())

Loading…
Cancel
Save