Locking
authormalc <av1474@comtv.ru>
Sun, 3 Feb 2013 12:06:02 +0000 (3 16:06 +0400)
committermalc <av1474@comtv.ru>
Sun, 3 Feb 2013 12:06:02 +0000 (3 16:06 +0400)
link.c

diff --git a/link.c b/link.c
index a2b7bb3..66afbba 100644 (file)
--- a/link.c
+++ b/link.c
@@ -1636,9 +1636,12 @@ static void * mainloop (void *unused)
             filenamelen = strlen (filename);
             password = filename + filenamelen + 1;
 
+            lock ("open");
             openxref (filename, password);
             pdfinfo ();
             initpdims ();
+            unlock ("open");
+
             if (!wthack) {
                 utf8filename = mbtoutf8 (filename);
                 printd ("msg Opened %s (press h/F1 to get help)", utf8filename);