Commit 2ce59b21 authored by Antenore Gatta's avatar Antenore Gatta

Merge branch 'fix_ar_crash' into 'master'

Fix crash when clicking AR-button

See merge request Remmina/Remmina!1918
parents 0c75bda6 f2958159
......@@ -31,6 +31,7 @@ Authors of Remmina Project
e-alfred <e-alfred@users.noreply.github.com>
Emmanuel Grognet <emmanuel@grognet.fr>
Eric Hoog <eric_hoog@hotmail.com>
Fabian Beu <f.beu@qgroup.de>
Fabian Rodriguez <magicfab@legoutdulibre.com>
Frank Bongrand <fbongrand@free.fr>
Frank Niessen <Frank.Niessen@rantzau.de>
......
......@@ -70,6 +70,7 @@ dupondje &lt;jean-louis@dupondje.be&gt;
e-alfred &lt;e-alfred@users.noreply.github.com&gt;
Emmanuel Grognet &lt;emmanuel@grognet.fr&gt;
Eric Hoog &lt;eric_hoog@hotmail.com&gt;
Fabian Beu &lt;f.beu@qgroup.de&gt;
Fabian Rodriguez &lt;magicfab@legoutdulibre.com&gt;
Frank Bongrand &lt;fbongrand@free.fr&gt;
Frank Niessen &lt;Frank.Niessen@rantzau.de&gt;
......
......@@ -367,10 +367,14 @@ static RemminaConnectionObject *rcw_get_visible_cnnobj(RemminaConnectionWindow *
{
gint np;
np = gtk_notebook_get_current_page(GTK_NOTEBOOK(cnnwin->priv->notebook));
if (np < 0)
return NULL;
return rcw_get_cnnobj_at_page(cnnwin, np);
if (cnnwin != NULL && cnnwin->priv!=NULL && cnnwin->priv->notebook != NULL) {
np = gtk_notebook_get_current_page(GTK_NOTEBOOK(cnnwin->priv->notebook));
if (np < 0)
return NULL;
return rcw_get_cnnobj_at_page(cnnwin, np);
}
else
return NULL;
}
static RemminaScaleMode get_current_allowed_scale_mode(RemminaConnectionObject *cnnobj, gboolean *dynres_avail, gboolean *scale_avail)
......@@ -1383,7 +1387,7 @@ static void rcw_toolbar_scaler_option(GtkWidget *widget, RemminaConnectionWindow
group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem));
if (!scaler_expand)
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), TRUE);
g_signal_connect(G_OBJECT(menuitem), "toggled", G_CALLBACK(rcw_scaler_keep_aspect), cnnobj);
g_signal_connect(G_OBJECT(menuitem), "toggled", G_CALLBACK(rcw_scaler_keep_aspect), cnnwin);
menuitem = gtk_radio_menu_item_new_with_label(group, _("Fill client window when scaled"));
gtk_widget_show(menuitem);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment