Coverity - Accesing attribute of null

There is a possibility that widget is null and then there could be an error.
Therefore there is new check of widget variable.

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
Pavel Vomacka authored and Petr Vobornik committed 2016-11-10 18:58:38 +01:00
1 parent de8cb7585b
commit 4b63ce26eb
1 file changed
+1 -1
@@ -252,7 +252,7 @@ widgets.APIBrowserWidget = declare([Stateful, Evented], {
}
// switch widget
if (!widget.el) widget.render();
if (widget && !widget.el) widget.render();
if (this.current_details_w !== widget) {
this.details_el.empty();
this.details_el.append(widget.el);