Fix potential issue spotted by PVS-Studio static analyzer and
described on https://www.viva64.com/en/b/0519/.
The _ticker_view_create may call _ticker_window_create with
invalid parameter. This situation cannot occur in current
code since ad is always valid pointer.
However function may cause crashes when some refactoring
will be applied without additional null-checking of 'ad' param.
Change-Id: I409ce3774390f9fa67ed26b7b9a8c34c5a7c077e
static int _ticker_view_create(void)
{
- if (!ticker.win)
+ if (!ticker.win && ticker.ad)
ticker.win = _ticker_window_create(ticker.ad);
if (!ticker.layout)
ticker.layout = _ticker_layout_create(ticker.win);