Merge lp:~elementary-apps/granite/aboutdialog-crash into lp:~elementary-pantheon/granite/granite

Proposed by xapantu
Status: Merged
Approved by: xapantu
Approved revision: 780
Merged at revision: 781
Proposed branch: lp:~elementary-apps/granite/aboutdialog-crash
Merge into: lp:~elementary-pantheon/granite/granite
Diff against target: 37 lines (+4/-3)
3 files modified
lib/Widgets/AboutDialog.vala (+1/-1)
lib/Widgets/widgets-utils.c (+1/-1)
lib/Widgets/widgets-utils.h (+2/-1)
To merge this branch: bzr merge lp:~elementary-apps/granite/aboutdialog-crash
Reviewer Review Type Date Requested Status
elementary Pantheon team Pending
Review via email: mp+232765@code.launchpad.net

Commit message

Solve crash when using the --about command line parameter by avoiding improper type casting.

Description of the change

Fix a crash in the about dialog (with pantheon-files, or audience for instance). It appears when the hardening options are enabled.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/Widgets/AboutDialog.vala'
2--- lib/Widgets/AboutDialog.vala 2014-08-09 16:06:37 +0000
3+++ lib/Widgets/AboutDialog.vala 2014-08-29 20:26:42 +0000
4@@ -117,5 +117,5 @@
5 }
6 }
7
8- public extern void show_about_dialog (Gtk.Window *parent, ...);
9+ public extern void show_about_dialog (Gtk.Window *parent, string first, ...);
10 }
11
12=== modified file 'lib/Widgets/widgets-utils.c'
13--- lib/Widgets/widgets-utils.c 2012-11-30 18:06:35 +0000
14+++ lib/Widgets/widgets-utils.c 2014-08-29 20:26:42 +0000
15@@ -67,7 +67,7 @@
16 if (!dialog)
17 {
18 //dialog = gtk_about_dialog_new ();
19- dialog = granite_widgets_about_dialog_new ();
20+ dialog = GTK_WIDGET (granite_widgets_about_dialog_new ());
21 g_object_ref_sink (dialog);
22
23 g_signal_connect (dialog, "delete-event",
24
25=== modified file 'lib/Widgets/widgets-utils.h'
26--- lib/Widgets/widgets-utils.h 2012-11-30 18:06:35 +0000
27+++ lib/Widgets/widgets-utils.h 2014-08-29 20:26:42 +0000
28@@ -1,6 +1,7 @@
29 #include <glib.h>
30 #include <gtk/gtk.h>
31+#include <granite.h>
32
33 void granite_widgets_show_about_dialog (GtkWindow *parent,
34 const gchar *first_property_name,
35- ...);
36+ ...);
37\ No newline at end of file

Subscribers

People subscribed via source and target branches