Fix read after deallocation
Do not draw if there's no lines