[chronojump] Fixed crash on right click treeview persons with no persons
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed crash on right click treeview persons with no persons
- Date: Mon, 25 Jan 2021 17:01:24 +0000 (UTC)
commit 7c4ecb0ddea4be3ed93735f56fc1cb3164e638a8
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Jan 25 18:01:03 2021 +0100
Fixed crash on right click treeview persons with no persons
src/gui/app1/chronojump.cs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 48b030f9..4780f520 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -1071,11 +1071,12 @@ public partial class ChronoJumpWindow
//Log.WriteLine("IS " + tvEvent.ExpandState);
}
- private void on_treeview_button_release_event (object o, ButtonReleaseEventArgs args) {
+ private void on_treeview_button_release_event (object o, ButtonReleaseEventArgs args)
+ {
Gdk.EventButton e = args.Event;
Gtk.TreeView myTv = (Gtk.TreeView) o;
if (e.Button == 3) {
- if(myTv == treeview_persons) {
+ if(myTv == treeview_persons && currentPerson != null) {
treeviewPersonsContextMenu(currentPerson);
} else if(myTv == treeview_jumps) {
if (myTreeViewJumps.EventSelectedID > 0) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]