Mercurial > piecrust2
diff piecrust/data/provider.py @ 557:703ea5d76f33
serve: Don't crash when looking at the debug info in a stand-alone window.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 12 Aug 2015 23:20:16 -0700 |
parents | 32c7c2d219d2 |
children | ab5c6a8ae90a |
line wrap: on
line diff
--- a/piecrust/data/provider.py Wed Aug 12 23:18:35 2015 -0700 +++ b/piecrust/data/provider.py Wed Aug 12 23:20:16 2015 -0700 @@ -178,7 +178,8 @@ def _onIteration(self): if not self._ctx_set: eis = self._page.app.env.exec_info_stack - eis.current_page_info.render_ctx.addUsedSource(self._source) + if eis.current_page_info: + eis.current_page_info.render_ctx.addUsedSource(self._source) self._ctx_set = True