98_SVG.pm: avoid crash (Forum #34523)

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8125 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2015-03-01 16:54:09 +00:00
parent ebae470d70
commit b52f05845f

View File

@@ -1374,6 +1374,7 @@ SVG_render($$$$$$$$$$)
my $lIdx = 0;
$idx = $srcDesc->{rev}{$dIdx}{$lIdx};
my $dp = $da->[$dIdx];
next if(ref $dp ne "SCALAR"); # Avoid Crash, Forum #34523
my ($dpl,$dpoff,$l) = (length($$dp), 0, "");
while($dpoff < $dpl) { # using split instead is memory hog
my $ndpoff = index($$dp, "\n", $dpoff);