diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-16 14:07:31 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-16 14:07:31 -0700 |
commit | 56cd48e0e1d78f539079dcdb20cf043ae8cf4b4b (patch) | |
tree | 0f27e3c9403c8b2fd121109121c75c126812b13f /src/library_sdl.js | |
parent | c8424ffa1546c67eb2c08cb1860630a99b2efd22 (diff) |
fix test_sdl_alloctext
Diffstat (limited to 'src/library_sdl.js')
-rw-r--r-- | src/library_sdl.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js index 7fad5941..75544765 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -549,6 +549,9 @@ var LibrarySDL = { var h = fontData.size; var fontString = h + 'px ' + fontData.name; var tempCtx = SDL.ttfContext; +#if ASSERTIONS + assert(tempCtx, 'TTF_Init must have been called'); +#endif tempCtx.save(); tempCtx.font = fontString; var ret = tempCtx.measureText(text).width | 0; |