fix: early return in WindowIdentify::identifyWindowByPidEnv
If we cannot get desktop file from env, we should just failed.
This commit is contained in:
		
				
					committed by
					
						
						deepin-bot[bot]
					
				
			
			
				
	
			
			
			
						parent
						
							b9e5abf214
						
					
				
				
					commit
					1fd19ce97d
				
			@ -208,6 +208,10 @@ AppInfo *WindowIdentify::identifyWindowByPidEnv(Dock *_dock, WindowInfoX *winInf
 | 
			
		||||
    int launchedDesktopFilePid = launchedDesktopFilePidStr.toInt();
 | 
			
		||||
    qInfo() << "launchedDesktopFilePid=" << launchedDesktopFilePid << " launchedDesktopFile=" << launchedDesktopFile;
 | 
			
		||||
 | 
			
		||||
    if (launchedDesktopFile.isEmpty()) {
 | 
			
		||||
            return ret;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    auto pidIsSh = [](int pid) -> bool {
 | 
			
		||||
        Process parentProcess(pid);
 | 
			
		||||
        auto parentCmdLine = parentProcess.getCmdLine();
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user