--- deliantra/Deliantra-Client/DC/MapWidget.pm 2008/08/30 08:04:01 1.142 +++ deliantra/Deliantra-Client/DC/MapWidget.pm 2008/09/03 10:08:18 1.144 @@ -13,7 +13,7 @@ our @ISA = DC::UI::Base::; my $magicmap_tex = - new_from_file DC::Texture DC::find_rcfile "magicmap.png", + new_from_resource DC::Texture "magicmap.png", mipmap => 1, wrap => 0, internalformat => GL_ALPHA; sub new { @@ -613,6 +613,8 @@ if ($::MAP && $self->{texture_atime} < time) { my ($w, $h) = @$self{qw(w h)}; + return unless $w && $h; + my $sw = int $::WIDTH / ($::MAPWIDGET->{tilesize} * $::CFG->{map_scale}) + 0.99; my $sh = int $::HEIGHT / ($::MAPWIDGET->{tilesize} * $::CFG->{map_scale}) + 0.99;