From 321b1a90a2eb74b8b87e5f6930ab2a50c8189e94 Mon Sep 17 00:00:00 2001
From: Alessandro Ranellucci <aar@cpan.org>
Date: Sun, 8 Nov 2015 09:12:59 +0100
Subject: [PATCH] Two fixes for --debug

---
 lib/Slic3r/Print/Object.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm
index 99e692de2..35198b31b 100644
--- a/lib/Slic3r/Print/Object.pm
+++ b/lib/Slic3r/Print/Object.pm
@@ -686,7 +686,7 @@ sub detect_surfaces_type {
             # as bottom surfaces (to allow for bridge detection)
             if (@top && @bottom) {
                 my $overlapping = intersection_ex([ map $_->p, @top ], [ map $_->p, @bottom ]);
-                Slic3r::debugf "  layer %d contains %d membrane(s)\n", $layerm->id, scalar(@$overlapping)
+                Slic3r::debugf "  layer %d contains %d membrane(s)\n", $layerm->layer->id, scalar(@$overlapping)
                     if $Slic3r::debug;
                 @top = $difference->([map $_->expolygon, @top], $overlapping, S_TYPE_TOP);
             }
@@ -703,7 +703,7 @@ sub detect_surfaces_type {
             $layerm->slices->append($_) for (@bottom, @top, @internal);
             
             Slic3r::debugf "  layer %d has %d bottom, %d top and %d internal surfaces\n",
-                $layerm->id, scalar(@bottom), scalar(@top), scalar(@internal) if $Slic3r::debug;
+                $layerm->layer->id, scalar(@bottom), scalar(@top), scalar(@internal) if $Slic3r::debug;
         }
         
         # clip surfaces to the fill boundaries