]> git.draconx.ca Git - upkg.git/blobdiff - src/upkg.c
upkg: Don't crash if the specified package does not exist.
[upkg.git] / src / upkg.c
index 191444ecd58755f43b3fca74bebc1a534fd96ed1..1e2c6626df66ec041fd941c62515b59f7b679270 100644 (file)
@@ -341,7 +341,7 @@ int main(int argc, char **argv)
                return EXIT_FAILURE;
        }
 
-       if (!g_type_module_use(pkg)) {
+       if (!g_type_module_use(pkg) || !U_PKG(pkg)->pkg) {
                fprintf(stderr, "failed to load package: %s\n", pkg->name);
                return EXIT_FAILURE;
        }