Don't call method on potentially null object
authorKevin Ottens <kevin.ottens@nextcloud.com>
Mon, 15 Jun 2020 18:20:40 +0000 (20:20 +0200)
committerKevin Ottens <ervin@ipsquad.net>
Tue, 16 Jun 2020 17:15:53 +0000 (19:15 +0200)
commit73a689bc39734d1664fe0ab09479f18063abb733
tree5a63cf00e2529bf778a88cbb919bb9ede523e328
parent4f7a6cfb1d19dc2fc66aa87b307cb397a79020f3
Don't call method on potentially null object

We were calling accountState() on a "folder" member which could be
nullptr. In fact this would happen any time one right click on a file
outside of a sync dir under Windows, this thus led to a crash.

Since the capabilities variable was unused anyway, we just removed it.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
src/gui/socketapi.cpp