Fix: Don't access nullptr library
requested to merge 376-bug-crash-when-library-sync-finished-but-the-library-has-been-deleted into master
This fixes a bug where a library was accessed which was previously being requested for deletion. In this case, the library was potentially null - accessing then would cause the program to abort.
Closes #376 (closed)