- can't assume otherdb being available in sqlite handler
[apt.git] / apt-pkg / rpm / rpmhandler.cc
index ead4b96..8475ba0 100644 (file)
@@ -1611,6 +1611,10 @@ bool RPMSqliteHandler::ChangeLog(vector<ChangeLogEntry* > &ChangeLogs)
    ostringstream sql;
    unsigned long pkgKey = Packages->GetColI("pkgKey");
    sql  << "select * from changelog where pkgKey=" << pkgKey << endl;
+   if (! Other) {
+      return false;
+   }
+
    SqliteQuery *Changes = Other->Query();
    if (!Changes->Exec(sql.str())) {
       return false;