From a7d7c963579176dfefe424931a57e86bc8b51924 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Sun, 4 Mar 2007 06:28:48 +0000 Subject: * handle changes: callbacks should check handle first, as there's a few occasions where some alpm stuff could be used without initializing the library (vercmp is one). TODO make these functions (handle accessors) better by returning "library not initialized" instead of failing. * Removed NoUpgrade lines from pacman.conf - we need to test this! * Re-corrected the lib targets for src/util/* * make dist seems to have updated the po files --- lib/libalpm/handle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/handle.c') diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 6e8e45e3..5ca8258e 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -119,8 +119,8 @@ int _alpm_handle_free(pmhandle_t *handle) return(0); } -alpm_cb_log alpm_option_get_logcb() { return handle->logcb; } -alpm_cb_download alpm_option_get_dlcb() { return handle->dlcb; } +alpm_cb_log alpm_option_get_logcb() { return (handle ? handle->logcb : NULL); } +alpm_cb_download alpm_option_get_dlcb() { return (handle ? handle->dlcb : NULL); } unsigned short alpm_option_get_logmask() { return handle->logmask; } const char SYMEXPORT *alpm_option_get_root() { return handle->root; } const char SYMEXPORT *alpm_option_get_dbpath() { return handle->dbpath; } -- cgit v1.2.3-24-g4f1b