- else if (him->get_stencil ())
- warning (him->name () + " has empty extent and non-empty stencil.");
+ else
+ {
+ Stencil *st = him->get_stencil ();
+ if (st && !st->is_empty ())
+ warning (him->name () + " has empty extent and non-empty stencil.");
+ }