diff options
-rw-r--r-- | src/gui/image/qpixmap.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index f896572..71fb079 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -112,8 +112,13 @@ void QPixmap::init(int w, int h, Type type) init(w, h, int(type)); } +extern QApplication::Type qt_appType; + void QPixmap::init(int w, int h, int type) { + if (qt_appType == QApplication::Tty) + qFatal("QPixmap: Cannot create a QPixmap when no GUI is being used"); + if ((w > 0 && h > 0) || type == QPixmapData::BitmapType) data = QPixmapData::create(w, h, (QPixmapData::PixelType) type); else |