]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - c++/cursespad.cc
ncurses 5.6 - patch 20080830
[ncurses.git] / c++ / cursespad.cc
index d875a815c74b70599357937bc8c8386a5174a7a2..28c58fab36acaae85ff1016ecc5effdf639cf842 100644 (file)
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include "internal.h"
 
-#include <stdio.h>
+#include <etip.h>
+#include <cursesw.h>
 
-#include "etip.h"
-#include "cursesw.h"
-
-MODULE_ID("$Id: cursespad.cc,v 1.11 2005/07/23 20:51:23 tom Exp $")
+MODULE_ID("$Id: cursespad.cc,v 1.13 2008/08/04 18:59:22 tom Exp $")
 
 NCursesPad::NCursesPad(int nlines, int ncols)
   : NCursesWindow(),
@@ -214,6 +212,7 @@ void NCursesPad::setSubWindow(NCursesWindow& sub)
 {
   if (static_cast<NCursesWindow*>(0) == viewWin)
     err_handler("Pad has no viewport");
+  assert(viewWin != 0);
   if (!viewWin->isDescendant(sub))
     THROW(new NCursesException("NCursesFramePad", E_SYSTEM_ERROR));
   viewSub = &sub;