From b89feee3b26be17a08bf1598618d4d7709a73cb9 Mon Sep 17 00:00:00 2001
From: Good Guy <good1.2guy@gmail.com>
Date: Mon, 27 Jul 2020 20:15:29 -0600
Subject: [PATCH] fix initialized result in grab, fix empty mixer paste, tweak
 cuda drop compute_30 arch

---
 cinelerra-5.1/cinelerra/zwindowgui.C | 2 +-
 cinelerra-5.1/guicast/bcwindowbase.C | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/cinelerra-5.1/cinelerra/zwindowgui.C b/cinelerra-5.1/cinelerra/zwindowgui.C
index 515d41ba..722e6c14 100644
--- a/cinelerra-5.1/cinelerra/zwindowgui.C
+++ b/cinelerra-5.1/cinelerra/zwindowgui.C
@@ -130,7 +130,7 @@ int ZWindowGUI::button_press_event()
 			start = mwindow->edl->tracks->total_recordable_length();
 			if( start < 0 ) start = end;
 		}
-		if( (end-start) > 1e-4 ) {
+		if( (end-start) > 1e-4 && zwindow->edl ) {
 			LocalSession *zlocal_session = zwindow->edl->local_session;
 			zlocal_session->set_selectionstart(end);
 			zlocal_session->set_selectionend(end);
diff --git a/cinelerra-5.1/guicast/bcwindowbase.C b/cinelerra-5.1/guicast/bcwindowbase.C
index 87148812..9f3e2123 100644
--- a/cinelerra-5.1/guicast/bcwindowbase.C
+++ b/cinelerra-5.1/guicast/bcwindowbase.C
@@ -963,6 +963,7 @@ if( debug && event->type != ClientMessage ) {
 	if( active_grab ) {
 		grab_lock->lock("BC_WindowBase::dispatch_event 3");
 		unlock_window();
+		result = 0;
 		if( active_grab ) {
 			active_grab->lock_window("BC_WindowBase::dispatch_event 3");
 			result = active_grab->grab_event(event);
-- 
2.26.2