mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 13:33:27 -07:00
Workaround for Bug #3039151
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@774 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
bd85737b22
commit
08b94ca321
1 changed files with 9 additions and 4 deletions
|
@ -80,10 +80,15 @@ namespace Greenshot {
|
||||||
// check whether there's an local instance running already
|
// check whether there's an local instance running already
|
||||||
|
|
||||||
// 1) Create Mutex
|
// 1) Create Mutex
|
||||||
applicationMutex = new Mutex(false, @"Local\F48E86D3-E34C-4DB7-8F8F-9A0EA55F0D08");
|
try {
|
||||||
// 2) Get the right to it, this returns false if it's already locked
|
applicationMutex = new Mutex(false, @"Local\F48E86D3-E34C-4DB7-8F8F-9A0EA55F0D08");
|
||||||
if (!applicationMutex.WaitOne(0, false)) {
|
// 2) Get the right to it, this returns false if it's already locked
|
||||||
isAlreadyRunning = true;
|
if (!applicationMutex.WaitOne(0, false)) {
|
||||||
|
isAlreadyRunning = true;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOG.Error("Can't create Mutex, for now we assume it's already there.", e);
|
||||||
|
isAlreadyRunning = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int argumentNr = 0; argumentNr < args.Length; argumentNr++) {
|
for(int argumentNr = 0; argumentNr < args.Length; argumentNr++) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue