mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-03-12 20:58:17 +03:00
Don't SIGSEGV if no transport is used.
One of previous commits (74b1b62510d939) allowed us to connect to localhost directly if ssh transport was used. However, if there's not transport, we SIGSEGV'ed as g_str_equal doesn't like NULL as one of arguments. Change this to g_strcmp0 which does the same service but is more friendly to NULL arguments.
This commit is contained in:
parent
fa39c5335c
commit
9983fe74dd
@ -376,7 +376,7 @@ virt_viewer_extract_connect_info(VirtViewer *self,
|
||||
*/
|
||||
if (virt_viewer_replace_host(ghost)) {
|
||||
gchar *replacement_host = NULL;
|
||||
if (g_str_equal(transport, "ssh")) {
|
||||
if (g_strcmp0(transport, "ssh") == 0) {
|
||||
replacement_host = g_strdup("localhost");
|
||||
} else {
|
||||
replacement_host = g_strdup(host);
|
||||
|
Loading…
x
Reference in New Issue
Block a user