Certainly not a happy situation. Lots of possibilities, some of them minor and some not so. It sounds to me like the mag might not have been completely locked in place, which could lead to irregular extraction/ejection and then eventually the mag drop.
It may have been operator error. That's certainly the best-case scenario, since you can solve it yourself. I'd try shooting another couple hundred rounds through the gun to see if it happens again.
It may be a problem with the magazine. While keeping it loaded for 6mos shouldn't harm it in any way, there's a chance that while carrying it day to day something (particularly the mag catch slot) was damaged. Try shooting with your other magazines to see whether it happens with all of them or just one "problem" mag.
If the problem persists with all your mags and you're confident you're not doing something different in your grip or shooting style, then your mag catch is probably wearing. Mine went south between 11 and 12 thousand rounds, but my gun is a 9mm so it probably takes less of a beating per shot. I'm guessing your gun is old enough that it has the older style mag catch. The new ones have a stronger steel engagement area. While it sucks that it's happened, at least you know that Smith can send you out a new one pretty quickly. I'd bet that will solve the problem.
If it is your mag catch wearing, it demonstrates something a number of us have feared ... that the generation of guns that had/have the mag drop problem may not all show the problem in the first hundred or even thousand rounds. That means people will be discovering the issue for years to come at various points in their service life. If this proves to be the case, I might suggest that anyone with a pre-tool-steel mag catch call Smith for a replacement. But hopefully the problem isn't with your catch and the fear is just paranoia at this point.