From 037ff0807f92ebc650c02846ac2bc6ce3cdecdf4 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Mon, 2 Aug 2021 14:59:15 +0300 Subject: Added --tab-url option to print active tab's URL IssueID #319 --- src/ipc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ipc.c') diff --git a/src/ipc.c b/src/ipc.c index ce98b6cf..e4c95c50 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -172,6 +172,7 @@ static void handleSignal_IpcResponse_(int sig) { } iBool write_Ipc(iProcessId pid, const iString *input, enum iIpcWrite type) { + if (!pid) return iFalse; iBool ok = iFalse; iFile *f = newCStr_File(inputFilePath_(&ipc_, pid)); if (open_File(f, text_FileMode | append_FileMode)) { @@ -281,6 +282,7 @@ void listen_Ipc(void) { } iBool write_Ipc(iProcessId pid, const iString *input, enum iIpcWrite type) { + if (!pid) return iFalse; iUnused(type); HANDLE slot = CreateFile(slotName_(pid), GENERIC_WRITE, -- cgit v1.2.3