~siretart/gnucash/ubuntu-fullsource

« back to all changes in this revision

Viewing changes to src/import-export/import-account-matcher.c

  • Committer: Reinhard Tartler
  • Date: 2008-08-03 07:27:37 UTC
  • mto: (2.1.1 debian)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: siretart@tauware.de-20080803072737-tnidfmnpamgavfk5
import gnucash_2.2.6.orig.tar.gz

The original tarball had the md5sum: 7ac08c5e2076c9b4d44c785d21bc1a2f

Show diffs side-by-side

added added

removed removed

Lines of Context:
228
228
        switch (response) {
229
229
         case GTK_RESPONSE_OK:
230
230
          retval = gnc_tree_view_account_get_selected_account(picker->account_tree);
231
 
          retval_name = xaccAccountGetName(retval);
232
 
          DEBUG("Selected account %p, %s", retval,
233
 
                retval_name ? retval_name : "(null)");
 
231
          if (retval)
 
232
            retval_name = xaccAccountGetName(retval);
 
233
          if (!retval_name)
 
234
            retval_name = "(null)";
 
235
          DEBUG("Selected account %p, %s", retval, retval_name);
234
236
 
235
237
          /* See if the selected account is a placeholder. */
236
 
          if (xaccAccountGetPlaceholder (retval)) {
 
238
          if (retval && xaccAccountGetPlaceholder (retval)) {
237
239
            gnc_error_dialog
238
240
              (picker->dialog,
239
241
               _("The account %s is a placeholder account and does not allow "
240
242
                 "transactions. Please choose a different account."),
241
 
               retval_name ? retval_name : "(null)");
 
243
               retval_name);
242
244
            response = GNC_RESPONSE_NEW;
243
245
            break;
244
246
          }