Walgreens Boots Alliance (WBA 0.57%) is coming off another uninspiring quarter. The pharmacy retailer's bottom line isn't in great shape, and investors are losing patience as the stock is trading around a 12-year low. While it offers a high dividend yield today, is it only a matter of time before the company cuts its payout?

Earnings fell by 58% last quarter

On June 27 Walgreens reported its third-quarter earnings numbers, and they weren't great. Earnings per share (EPS) of $0.14 for the period ending May 31 were down by 58% compared to the $0.33 per-share profit that the pharmacy retailer reported in the prior-year period.

Walgreens blamed the diminished results on a decline in demand for COVID-19 vaccines and testing. And as a result of that, it also slashed its forecast for adjusted EPS for the fiscal year (which ends in August). The company projects its adjusted EPS will be between $4.00 and $4.05, which is down from a previous forecasted range of $4.45 and $4.65. This updated forecast also factors in "a more cautious macroeconomic forward view."

What does this mean for the dividend?

Walgreens didn't suggest that it would cut its dividend. In fact, on the earnings report, it said that its focus with respect to capital allocation was on paying dividends, reducing debt, and core investments (e.g. building out its U.S. healthcare business).

The company's dividend, which is due for an increase this month, currently pays investors $1.92 per share over the course of a full year. Even based on its reduced forecast for adjusted EPS, that would put its dividend payout ratio at less than 50% based on that metric.

It is, however, a bit of a different story when it comes to cash flow. Last quarter the company's free cash flow was negative, which was the third time in the past four quarters that that has happened. On a quarterly basis, the dividend costs the company about $415 million. Walgreens needs to be generating free cash flow to support those payments plus be able to invest in its U.S. healthcare business, which is part of its long-term growth strategy.

While Walgreens' adjusted earnings numbers suggest the dividend is still OK, free cash flow can oftentimes paint a more reliable picture with respect to a dividend. If the company isn't generating money from its operations after factoring in capital expenditures, it may be difficult to justify paying a dividend.

Should investors expect a dividend cut?

Walgreens has been paying and increasing its dividend for decades. It is nearly a Dividend King, and it would take something drastic for the company to slash its dividend. While the future outlook for the economy might be concerning given the uncertainty ahead, it doesn't appear that would be enough to warrant that kind of a move.

I would expect the company continues to pay dividends and makes very nominal increases to the payout annually. Walgreens has announced it has taken actions to achieve more cost savings, which will also improve its cash flow and bottom line. Now the company projects that its transformational cost management program will achieve savings of $4.1 billion, up from a previous forecast of $3.5 billion.

Is Walgreens stock a buy?

Walgreens' stock is down 22% this year, and it trades at a forward price-to-earnings multiple of just seven. While it looks cheap, it's arguably a value trap -- Walgreens' business isn't doing well, and is facing challenges ahead. It's not a stock I would buy until it can get back to generating positive free cash flow on a consistent basis.

There are many other, safer dividend stocks that investors can buy. Unless you have a high risk tolerance and are willing to be incredibly patient with Walgreens, this isn't a stock worth investing in right now.