Fix overwriting memory for an application icon

This resolves Bug 2033
pull/1/head
Slávek Banko 11 years ago
parent a9ec6a1556
commit d5059601e6

@ -1531,12 +1531,12 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
int* line2[3];
int* pv[3];
if ( ( conversion_flags & TQt::Dither_Mask ) == TQt::DiffuseDither ) {
line1[0] = new int[src->width()];
line2[0] = new int[src->width()];
line1[1] = new int[src->width()];
line2[1] = new int[src->width()];
line1[2] = new int[src->width()];
line2[2] = new int[src->width()];
line1[0] = new int[sw];
line2[0] = new int[sw];
line1[1] = new int[sw];
line2[1] = new int[sw];
line1[2] = new int[sw];
line2[2] = new int[sw];
pv[0] = new int[sw];
pv[1] = new int[sw];
pv[2] = new int[sw];

@ -764,6 +764,7 @@ TQImage TQPixmap::convertToImage() const
else
#endif
qSafeXDestroyImage( xi );
((TQPixmap*)this)->data->ximage = 0;
return image;
}
@ -948,6 +949,7 @@ TQImage TQPixmap::convertToImage() const
else
#endif
qSafeXDestroyImage( xi );
((TQPixmap*)this)->data->ximage = 0;
return image;
}

@ -1336,7 +1336,6 @@ void TQWidget::setIcon( const TQPixmap &pixmap )
int r = int( tqRed( l ) );
int g = int( tqGreen( l ) );
int b = int( tqBlue( l ) );
ls[x] = tqRgb( r, g, b );
XSetForeground(x11Display(), gc, (r << 16) | (g << 8) | b );
XDrawPoint(x11Display(), pmHandle, gc, x, y);
}

Loading…
Cancel
Save