aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPProcessListController.m25
1 files changed, 14 insertions, 11 deletions
diff --git a/Source/SPProcessListController.m b/Source/SPProcessListController.m
index 92744276..07c67247 100644
--- a/Source/SPProcessListController.m
+++ b/Source/SPProcessListController.m
@@ -623,17 +623,20 @@
NSUInteger i = 0;
// Get processes
- MCPResult *processList = [connection listProcesses];
-
- [processList setReturnDataAsStrings:YES];
-
- if ([processList numOfRows]) [processList dataSeek:0];
-
- [processes removeAllObjects];
-
- for (i = 0; i < [processList numOfRows]; i++)
- {
- [processes addObject:[processList fetchRowAsDictionary]];
+ if ([connection isConnected]) {
+
+ MCPResult *processList = [connection listProcesses];
+
+ [processList setReturnDataAsStrings:YES];
+
+ if ([processList numOfRows]) [processList dataSeek:0];
+
+ [processes removeAllObjects];
+
+ for (i = 0; i < [processList numOfRows]; i++)
+ {
+ [processes addObject:[processList fetchRowAsDictionary]];
+ }
}
// Update the UI on the main thread