[dia] Don't crash on Help, if there is no diagram open
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Don't crash on Help, if there is no diagram open
- Date: Thu, 29 Jul 2010 19:07:40 +0000 (UTC)
commit 372dbf356321f2d4fe633a875f70a50fdfef7589
Author: Hans Breuer <hans breuer org>
Date: Thu Jul 29 20:42:03 2010 +0200
Don't crash on Help, if there is no diagram open
Also the use of ddisp->menubar was changed because it is NULL for the non-integrated case.
app/commands.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/app/commands.c b/app/commands.c
index 7eded3c..b028f9c 100644
--- a/app/commands.c
+++ b/app/commands.c
@@ -630,7 +630,8 @@ help_manual_callback (GtkAction *action)
GdkScreen *screen;
DDisplay *ddisp;
ddisp = ddisplay_active();
- screen = gtk_widget_get_screen (GTK_WIDGET(ddisp->menu_bar));
+ screen = ddisp ? gtk_widget_get_screen (GTK_WIDGET(ddisp->shell))
+ : gdk_screen_get_default ();
if (gtk_show_uri(screen, "ghelp:dia", gtk_get_current_event_time (), NULL)) {
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]