Paul, A clogged spark arrestor screen inside the muffler can cause a chainsaw to stop after a few minutes.
Or a blocked fuel tank vent could be the problem, you can check by running the chainsaw with the fuel cap on loose.

cheers gmax