BlackBerry's (BB 1.80%) sales numbers jumped last quarter, and its loss narrowed. The company has been closing on more deals, and its software is in millions of more vehicles.

BlackBerry looks to be on a much more positive trajectory, and its shares have risen almost 60% this year, but can this rally continue? Here's a closer look at its recent earnings performance and whether the stock is a buy right now.

Sales nearly doubled -- but they were boosted by patent sales

BlackBerry's revenue for the three-month period ended May 31 totaled $373 million, which was more than double the $168 million that it reported a year earlier. But that growth is misleading, because the company sold the noncore portion of its patents, which injected its licensing segment with an additional $218 million revenue. Take that out, and BlackBerry's total revenue becomes $155 million, which represents an 8% year-over-year decline in the top line.

In the company's key segments, cybersecurity and Internet of Things (IoT), the results were much more disappointing. In cybersecurity, sales of $93 million were down by 18%, while IoT revenue of $45 million fell by 12%.

BlackBerry continues to struggle to generate growth, and the blip this past quarter shows just what kind of anomaly it really was:

BB Revenue (Quarterly YoY Growth) Chart

Data source: YCharts

BlackBerry still didn't turn out a real profit

Although BlackBerry reported adjusted earnings per share of $0.06 for the quarter (which beat expectations that called for a per-share loss of $0.05), it incurred a net loss of $11 million. That's an improvement from a loss of $181 million in the same period last year, but it's a disappointing result, given that even with sales doubling from a year ago, that still wasn't enough to get the company into the black -- without having to adjust its numbers.

The company did incur a $22 million charge related to revaluing its debentures, but other than that, there were no large impairment costs or other surprise expenses that weighed down its bottom line. And while cash flow of $99 million for the period was positive, that too was largely due to intellectual property sales bringing in $147 million in additional cash.

Is there any reason to invest in BlackBerry's stock today?

There are reasons BlackBerry's business should do well. More companies are moving to the cloud and are in need of cybersecurity services. The company's QNX software for driver assistance, digital instrumentation and entertainment systems is in 235 million vehicles, which is an increase of 20 million from a year ago.

But the financial results simply haven't followed. Sales continue to stall, and there's little evidence of the company's efforts and deals paying off and leading to any noticeable revenue growth.

Over the past five years, the stock has fallen 48%. Without a catalyst to turn things around, there's little reason to expect that in the next five years it will return positive results. BlackBerry is a risky stock to own, as profitability remains a long shot, and even sales growth isn't a given at this point. This is a stock that investors should continue to avoid.  There's a lot of competition in tech and cybersecurity, and BlackBerry doesn't appear to have the economic moat necessary to be a good long-term buy.