for (;;)
{
- if ((insert_position == m_root.end()) || (invert_sense ^ (insert_position->m_z_position >= root->m_z_position)))
+ if ((insert_position == m_root.end()) || (invert_sense ^ (insert_position->m_z_position < root->m_z_position)))
{
m_root.insert(insert_position, root);
break;
return;
}
- ePtr<gDC> pixmap_dc = new gDC(&pm);
- gPainter pixmap_painter(pixmap_dc);
-
ePtr<gPixmap> target_pixmap;
m_screen.m_dc->getPixmap(target_pixmap);
assert(target_pixmap);
+ if (target_pixmap->surface && target_pixmap->surface->bpp > 8)
+ return;
+
+ ePtr<gDC> pixmap_dc = new gDC(&pm);
+ gPainter pixmap_painter(pixmap_dc);
+
pixmap_painter.mergePalette(target_pixmap);
}