diff options
author | Lukas Venhoda <lvenhoda@redhat.com> | 2015-06-15 12:47:30 +0200 |
---|---|---|
committer | Pavel Grunt <pgrunt@redhat.com> | 2015-06-16 14:10:03 +0200 |
commit | ee785d33525735b0af2042fee5eb451c8b0b45c9 (patch) | |
tree | ba262847f4cd236438363d2a8f15c1f21186afa6 | |
parent | e7dcc5a4971348b54973f4805b9cb708aecff860 (diff) |
remote-viewer-connect: Check if uri is NULL
URI should be NULL before passing it to remote_viewer_connect_dialog.
-rw-r--r-- | src/remote-viewer-connect.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/remote-viewer-connect.c b/src/remote-viewer-connect.c index 5c3b03f..a4bce27 100644 --- a/src/remote-viewer-connect.c +++ b/src/remote-viewer-connect.c @@ -97,7 +97,7 @@ make_label_bold(GtkLabel* label) * @brief Opens connect dialog for remote viewer * * @param main_window Parent window of the dialog -* @param uri For returning the uri of chosen server +* @param uri For returning the uri of chosen server, must be NULL * * @return TRUE if Connect or ENTER is pressed * @return FALSE if Cancel is pressed or dialog is closed @@ -112,6 +112,8 @@ remote_viewer_connect_dialog(GtkWindow *main_window, gchar **uri) GtkRecentFilter *rfilter; gboolean retval; + g_return_val_if_fail(uri && *uri == NULL, FALSE); + /* Create the widgets */ dialog = gtk_dialog_new_with_buttons(_("Connection details"), main_window, |