[education/rkward] rkward/rbackend: fix too soon deletion

Thomas Friedrichsmeier null at kde.org
Sat Jun 11 15:24:21 BST 2022


Git commit acd2a41036b4fe41f28875f781d2bb5d106d0805 by Thomas Friedrichsmeier.
Committed on 10/06/2022 at 23:08.
Pushed by tfry into branch 'master'.

fix too soon deletion

M  +1    -1    rkward/rbackend/rkrbackend.cpp

https://invent.kde.org/education/rkward/commit/acd2a41036b4fe41f28875f781d2bb5d106d0805

diff --git a/rkward/rbackend/rkrbackend.cpp b/rkward/rbackend/rkrbackend.cpp
index 3ded40f5..b9faa368 100644
--- a/rkward/rbackend/rkrbackend.cpp
+++ b/rkward/rbackend/rkrbackend.cpp
@@ -1749,10 +1749,10 @@ void RKRBackend::checkObjectUpdatesNeeded (bool check_list) {
 	
 		if (search_update_needed) {	// this includes an update of the globalenv, even if not needed
 			dummy = runDirectCommand ("loadedNamespaces ()\n", RCommand::GetStringVector);
-			delete dummy;
 			QVariantList args;
 			args.append(QVariant(toplevel_env_names));
 			args.append(QVariant(dummy->stringVector()));
+			delete dummy;
 			handleRequestWithSubcommands("syncenvs", args);
 		} 
 	}



More information about the rkward-tracker mailing list