only destroy the widget if it has actually been created

This commit is contained in:
blizzard%appliedtheory.com 1998-12-18 02:52:55 +00:00
Родитель 22ca77073e
Коммит 22a93da773
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -74,7 +74,8 @@ nsWindow::nsWindow()
nsWindow::~nsWindow()
{
OnDestroy();
gtk_widget_destroy(mWidget);
if (GTK_IS_WIDGET(mWidget))
gtk_widget_destroy(mWidget);
if (nsnull != mGC) {
gdk_gc_destroy(mGC);
mGC = nsnull;