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:
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);
|
||||
|
||||
Reference in new issue
Block a user