mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-01 13:10:35 +00:00
Avoid 'Dereference of a null pointer'
Caught by Covscan.
This commit is contained in:
parent
618e22d71a
commit
fa952ad9b2
@ -812,7 +812,7 @@ virt_viewer_auth_libvirt_credentials(virConnectCredentialPtr cred,
|
||||
VirtViewerWindow *vwin = virt_viewer_app_get_main_window(VIRT_VIEWER_APP(app));
|
||||
GtkWindow *win = virt_viewer_window_get_window(vwin);
|
||||
|
||||
if (*username == NULL || **username == '\0')
|
||||
if (username && (*username == NULL || **username == '\0'))
|
||||
*username = g_strdup(g_get_user_name());
|
||||
|
||||
priv->auth_cancelled = !virt_viewer_auth_collect_credentials(win,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user