CC: | smailliw [...] gmail.com |
Subject: | spurious error: "Tool::Font::print requires a SDL::Surface" |
I got an error trying to run test/testfonttool.pl, and narrowed it down
to a logic error in SDL::Tool::Font. Why would we want to throw an
error just because $SDL::DEBUG was not set?
I have attached one way to fix it.
Subject: | sdl-tool-font.patch |
--- lib/SDL/Tool/Font.pm 2009/07/15 01:40:00 1.1
+++ lib/SDL/Tool/Font.pm 2009/07/15 01:40:22
@@ -46,7 +46,7 @@
sub print {
my ($self,$surface,$x,$y,@text) = @_;
die "Tool::Font::print requires a SDL::Surface\n"
- unless ($SDL::DEBUG && $surface->isa('SDL::Surface'));
+ unless $surface->isa('SDL::Surface');
if ($$self{-font}->isa('SDL::Font')) {
$$self{-font}->use();
SDL::SFont::PutString( $$surface, $x, $y, join('',@text));