0

Merge remote branch 'upstream/devel' into devel

This commit is contained in:
Richard Pastrick
2012-04-11 14:53:09 -07:00
2 changed files with 2 additions and 2 deletions

View File

@@ -90,6 +90,7 @@ overlay_mineral_start(void *data, RenderState *state, PyObject *support) {
/* now do custom initializations */ /* now do custom initializations */
self = (RenderPrimitiveMineral *)data; self = (RenderPrimitiveMineral *)data;
// opt is a borrowed reference. do not deref
if (!render_mode_parse_option(support, "minerals", "O", &(opt))) if (!render_mode_parse_option(support, "minerals", "O", &(opt)))
return 1; return 1;
if (opt && opt != Py_None) { if (opt && opt != Py_None) {
@@ -119,7 +120,6 @@ overlay_mineral_start(void *data, RenderState *state, PyObject *support) {
} else { } else {
self->minerals = default_minerals; self->minerals = default_minerals;
} }
Py_XDECREF(opt);
/* setup custom color */ /* setup custom color */
self->parent.get_color = get_color; self->parent.get_color = get_color;

View File

@@ -508,7 +508,7 @@ class TileSet(object):
""" """
def bgcolorformat(color): def bgcolorformat(color):
return "#%02x%02x%02x" % color[0:3] return "#%02x%02x%02x" % color[0:3]
isOverlay = True in [True for x in self.options.get("rendermode") if isinstance(x, rendermodes.Overlay)] isOverlay = not any(isinstance(x, rendermodes.Base) for x in self.options.get("rendermode"))
d = dict(name = self.options.get('title'), d = dict(name = self.options.get('title'),
zoomLevels = self.treedepth, zoomLevels = self.treedepth,