Without knowing more about your barcode reader's API and behavior, I'd guess it's that you have a race condition where your BarCodeRead event could fire while you're inside tbCodMaterial_TextChanged. I would suggest placing a synchronization block around the code that disables the scanner, and inside the block only perform the shutdown if the scanner is non-null:
private readonly Object mySynchronizationObject = new Object;
...
lock (mySynchronizationObject)
{
if (leitor != null)
{
//disposal of the barcodereader instance
...
}
}
It also wouldn't hurt to disconnect from the event prior to shutdown (inside the above lock):
leitor.BarcodeRead -= new BarcodeReadEventHandler(this.eventoLeitorCodigoDeBarrasArmazenagem1);