Suncor Energy (NYSE:SU) announced heavy losses in its second-quarter earnings, as the impacts of large Canadian wildfires crushed the company's oil-sands production. Suncor posted $558 million (C$735 million) in net losses, caused in large part by the $806 million in net losses from its oil-sands operations. The second-quarter losses couldn't have come at a worse time for Suncor, as it tries to boost confidence in its $6 billion in investments in oil sands over the past year.

But while the quarter highlighted the perils of investing too heavily in a single region, it also offered several positive developments. As investors, you might consider chalking these earnings up to extremely bad luck and focus instead on the fact that Suncor remains a solid long-term addition to your portfolio.

Fire damage

No amount of fire retardant could tamp down the adverse impacts of the wildfires that shut down Suncor's oil sands production for close to two months this quarter. While no facilities were damaged, the company's production from the region dropped from 565,000 barrels of oil equivalent per day (BOE/D) in the first quarter to just 213,000 BOE/D in the second quarter. For a company that expects to produce between 585,000 and 620,000 BOE/D in 2016, those losses are difficult to stomach.

The losses are reflected in Suncor's cash flows from its oil sands operations, which dropped to negative-$153 million, as opposed to positive cash flows of over $800 million from the same quarter in 2015. The company's overall cash flows haven't covered its capital expenditures for three straight quarters now. That has led to free cash flow for the past year of negative-$1.75 billion. That's largely driven by the historically low oil prices during that time, and the wildfires just added to the pain.

All of this comes after Suncor spent $6 billion to take majority interests in the Syncrude and Fort Hills oil sands ventures over the past year. Long-term, these investments will help to significantly boost production. Short-term, though, Suncor will probably incur further losses as it invests further capital to bring these projects to their desired outputs while oil prices keep cash flows low.

Glimmers of hope

Now remember, when a company can't pay for expenditures and investments with its cash flow, it must dig into its cash on hand or take on further debt. So it stands to reason that Suncor's balance sheet took a hit in the second quarter. Believe it or not, though, the company actually lowered its total debt-to-capitalization from over 29% last quarter to just over 28%.

Suncor managed these improvements by issuing a share issuance worth roughly $2.2 billion and paying off long-term notes worth about $1.2 billion. It used part of the proceeds to pay for Murphy Oil's 5% interest in Syncrude. By taking care of its balance sheet amid the wildfires and low oil prices, Suncor showed its commitment to financial discipline while retaining approximately $2.3 billion in cash on hand.

Additionally, while Suncor's strong bet on the oil sands exposes the company to damaging events such as a wildfire, the second quarter showed the strength of its diversified portfolio. As oil sands were losing $800 million, Suncor's refining and marketing business earned $522 million. Had Suncor been limited to strictly upstream income, the second quarter would have been significantly more damaging.

Foolish bottom line

Suncor's second quarter highlighted both the risks and strengths of its strategy. Its all-in approach to oil sands means investors might have to weather difficult quarters if oil prices remain low or the region experiences a downturn. Its fiscal discipline and impressive portfolio diversification, though, will help the company maintain solvency until its investments can boost its cash flows.

Wildfires ultimately wrecked Suncor's second quarter, but you should still feel comfortable about its long-term prospects.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.